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_identifier.hpp>
8 #include <boost/detail/lightweight_test.hpp>
9 #include <boost/preprocessor/list/at.hpp>
10 #include <boost/preprocessor/seq/elem.hpp>
11 #include <boost/preprocessor/tuple/elem.hpp>
12
main()13 int main()
14 {
15
16 #if BOOST_PP_VARIADICS
17
18 #define A_TUPLE (*,#,zzz)
19 #define JDATA somevalue
20 #define A_SEQ (num)(%)(#)
21 #define A_LIST (eeb,(grist,(&,BOOST_PP_NIL)))
22
23 #define BOOST_VMD_REGISTER_zzz (zzz)
24 #define BOOST_VMD_DETECT_zzz_zzz
25 #define BOOST_VMD_REGISTER_somevalue (somevalue)
26 #define BOOST_VMD_DETECT_somevalue_somevalue
27 #define BOOST_VMD_REGISTER_num (num)
28 #define BOOST_VMD_DETECT_num_num
29 #define BOOST_VMD_REGISTER_eeb (eeb)
30 #define BOOST_VMD_DETECT_eeb_eeb
31 #define BOOST_VMD_REGISTER_grist (grist)
32 #define BOOST_VMD_DETECT_grist_grist
33
34 BOOST_VMD_ASSERT_IS_IDENTIFIER(BOOST_PP_TUPLE_ELEM(2,A_TUPLE),zzz)
35 BOOST_VMD_ASSERT_IS_IDENTIFIER(JDATA,somevalue)
36 BOOST_VMD_ASSERT_IS_IDENTIFIER(BOOST_PP_SEQ_ELEM(0,A_SEQ),num)
37 BOOST_VMD_ASSERT_IS_IDENTIFIER(BOOST_PP_LIST_AT(A_LIST,0),eeb)
38 BOOST_VMD_ASSERT_IS_IDENTIFIER(BOOST_PP_LIST_AT(A_LIST,1),grist)
39
40 #else
41
42 BOOST_VMD_ASSERT(0)
43
44 #endif
45
46 return boost::report_errors();
47
48 }
49