1 2 // (C) Copyright Edward Diener 2011-2015 3 // Use, modification and distribution are subject to the Boost Software License, 4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt). 6 7 #include <boost/vmd/assert_is_tuple.hpp> 8 #include <boost/preprocessor/cat.hpp> 9 #include <boost/preprocessor/comparison/greater.hpp> 10 #include <boost/preprocessor/control/iif.hpp> 11 #include <boost/preprocessor/tuple/size.hpp> 12 #include <boost/detail/lightweight_test.hpp> 13 main()14int main() 15 { 16 17 #if BOOST_PP_VARIADICS 18 19 #if BOOST_VMD_ASSERT_DATA 20 21 #if BOOST_VMD_MSVC 22 23 #define AMACRO(atuple) \ 24 BOOST_PP_CAT \ 25 ( \ 26 BOOST_VMD_ASSERT_IS_TUPLE(atuple), \ 27 BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(atuple), 2),1,0) \ 28 ) 29 30 #else 31 32 #define AMACRO(atuple) \ 33 BOOST_VMD_ASSERT_IS_TUPLE(atuple) \ 34 BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(atuple), 2),1,0) 35 36 #endif 37 38 BOOST_TEST(AMACRO(73)); 39 40 #else 41 42 typedef char BOOST_VMD_DOC_ASSERT_FAIL_ERROR[-1]; 43 44 #endif 45 46 #endif 47 48 return boost::report_errors(); 49 50 } 51