std::ceil2
| Defined in header <bit>
|
||
| template< class T > constexpr T ceil2(T x); |
(since C++20) | |
Calculates the smallest integral power of two that is not smaller than x. If that value is not representable in T, the behavior is undefined.
This function is constexpr only if the result is representable in T.
This overload only participates in overload resolution if T is an unsigned integer type (that is, unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long, or an extended unsigned integer type).
Contents |
[edit] Parameters
| x | - | values of unsigned integer type |
[edit] Return value
The smallest integral power of two that is not smaller than x.
[edit] Exceptions
(none)
[edit] Example
| This section is incomplete Reason: no example |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
