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

