What does static_assert do, and what would you use it for?
Could you give an example where static_assert(...) 'C++0x' would solve the problem in hand elegantly? I am familiar with run-time assert(...) . When should I prefer static_assert(...) over regular assert(...) ? Also, in boost there is something called BOOST_STATIC_ASSERT , is it the same as static_assert(...) ? Off the top of my head... #include "SomeLibrary.h" static_assert(SomeLibrary::Version > 2, "Old versions of SomeLibrary are missing the foo functionality. Cannot proceed!"); class UsingSomeLibrary { // ... }; Assuming that SomeLibrary::Version is declared as a static const, rather than