static_assert is a C++11 keyword that can be used to test at compile time. In C++98, BOOST_STATIC_ASSERT can be used instead.
- Use static_assert extensively [1]
- Distinguish among std::enable_if, static_assert, and =delete [2]
- Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 30.5. Advice. page 884: '[13] Use static_assert() and assert() extensively'
- Scott Meyers. C++ And Beyond 2012 session: 'Initial thoughts on Effective C++11'. 2012. 'Distinguish among std::enable_if, static_assert, and =delete'