#include <boost/preprocessor/facilities/apply.hpp> #include <boost/preprocessor/tuple/elem.hpp> #define CV(i) \ BOOST_PP_APPLY( \ BOOST_PP_TUPLE_ELEM( \ 4, i, \ (BOOST_PP_NIL, (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)