• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/is_list.hpp>
8 #include <boost/detail/lightweight_test.hpp>
9 
main()10 int main()
11   {
12 
13 #if BOOST_PP_VARIADICS
14 
15   #define A_LIST (e,(g,(&,BOOST_PP_NIL)))
16   #define AN_EMPTY_LIST BOOST_PP_NIL
17   #define AN_EMPTY_LIST_PLUS BOOST_PP_NIL ( here )
18 
19   BOOST_TEST(BOOST_VMD_IS_LIST((4,(x,BOOST_PP_NIL))));
20   BOOST_TEST(BOOST_VMD_IS_LIST(((3,6m,irj),(x,BOOST_PP_NIL))));
21   BOOST_TEST(BOOST_VMD_IS_LIST(A_LIST));
22   BOOST_TEST(BOOST_VMD_IS_LIST(AN_EMPTY_LIST));
23   BOOST_TEST(!BOOST_VMD_IS_LIST(AN_EMPTY_LIST_PLUS));
24 
25 #else
26 
27 BOOST_ERROR("No variadic macro support");
28 
29 #endif
30 
31   return boost::report_errors();
32 
33   }
34