C++ Template Metaprogramming
Solutions to the exercises throughout the book
|
Encapsulate solution for Exercise 3-0 (C++20). More...
Functions | |
consteval uint32_t | checked_binary (uint64_t const N) |
Prepend higher bits to lowest bit. | |
Encapsulate solution for Exercise 3-0 (C++20).
consteval uint32_t exercise_3_0::cpp20::checked_binary | ( | uint64_t const | N | ) |
Prepend higher bits to lowest bit.
[in] | N | A binary number to examine. Obvisouly, this should contain only 0 and 1. |
Definition at line 28 of file c++20/exercise-3-0.hpp.