Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
There are several instances in which you can replace run-time checks with compile-time checks.
Example 1: Compile-time Boolean conditions. If you are testing for compile-time Boolean conditions such as sizeof(int) >= 8, use static assertions instead of run-time tests. (But see also Item 91.)