- static_assert( bool_constexpr, message )
- static_assert( bool_constexpr ) /* Since C++17 */
|bool_constexpr||Expression to check|
|message||Message to print when bool_constexpr is false|
Unlike runtime assertions, static assertions are checked at compile-time and are also enforced when compiling optimized builds.
Standard Library Algorithms
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0