#include <boost/preprocessor/control/expr_if.hpp> #include <boost/preprocessor/tuple/elem.hpp> #define CV(n) \ BOOST_PP_EXPR_IF( \ n, \ BOOST_PP_TUPLE_ELEM( \ 4, n, \ (..., const, volatile, const volatile) \ ) \ ) \ /**/ CV(0) // expands to nothing CV(1) // expands to const
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)