C++ Boost



The header <boost/static_warning.hpp> supplies a single macro BOOST_STATIC_WARNING(x), which generates a compile time warning message if the integral-constant-expression x is not true.

Note that if the condition is true, then the macro will generate neither code nor data - and the macro can also be used at either namespace, class or function scope. When used in a template, the expression x will be evaluated at the time the template is instantiated; this is particularly useful for validating template parameters.

It is intended that the functioning of BOOST_STATIC_WARNING(x) be identical to that of BOOST_STATIC_ASSERT(x) except that rather than resulting in a compilation error, it will result in a compiler warning. In all other respects it should be the same. So for more information on using BOOST_STATIC_WARNING(x) consult the documentation for BOOST_STATIC_ASSERT(x) here.

© Copyright Robert Ramey 2002-2004. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)