// Copyright (C) 2009-2012 Lorenzo Caminiti // Distributed under the Boost Software License, Version 1.0 // (see accompanying file LICENSE_1_0.txt or a copy at // http://www.boost.org/LICENSE_1_0.txt) // Home at http://www.boost.org/libs/utility/identity_type #include #include #include #include //[paren #define TMP_ASSERT_PAREN(parenthesized_metafunction) \ /* use `BOOST_IDENTITY_TYPE` in macro definition instead of invocation */ \ BOOST_STATIC_ASSERT(BOOST_IDENTITY_TYPE(parenthesized_metafunction)::value) #define TMP_ASSERT(metafunction) \ BOOST_STATIC_ASSERT(metafunction::value) // Specify only extra parenthesis `((...))`. TMP_ASSERT_PAREN((boost::is_const const>)); // Specify both the extra parenthesis `((...))` and `BOOST_IDENTITY_TYPE` macro. TMP_ASSERT(BOOST_IDENTITY_TYPE((boost::is_const const>))); //] //[paren_always TMP_ASSERT_PAREN((boost::is_const)); // Always extra `((...))`. TMP_ASSERT(boost::is_const); // No extra `((...))` and no macro. //] int main() { return 0; }