std::ispow2
提供: cppreference.com
| ヘッダ <bit> で定義
|
||
| template< class T > constexpr bool ispow2(T x) noexcept; |
(C++20以上) | |
x が2の整数乗かどうか調べます。
このオーバーロードは、T が符号なし整数型 (つまり unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long または拡張符号なし整数型) である場合にのみ、オーバーロード解決に参加します。
[編集] 戻り値
x が2の整数乗であれば true、そうでなければ false。
[編集] 例
| This section is incomplete Reason: no example |

