• 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_array.hpp>
8 #include <boost/detail/lightweight_test.hpp>
9 
main()10 int main()
11   {
12 
13 #if BOOST_PP_VARIADICS
14 
15   #define AN_ARRAY (7,(5,7,f,x,%,-,U))
16 #if !BOOST_VMD_MSVC_V8
17   #define AN_EMPTY_ARRAY (0,())
18 #endif
19 
20   BOOST_TEST
21       (
22       BOOST_VMD_IS_ARRAY((4,(x,3,e,2)))
23       );
24 
25   BOOST_TEST
26       (
27       BOOST_VMD_IS_ARRAY((6,(x,3,e,2,(4,(x,3,e,2)),#)))
28       );
29 
30   BOOST_TEST
31       (
32       BOOST_VMD_IS_ARRAY(AN_ARRAY)
33       );
34 
35 #if !BOOST_VMD_MSVC_V8
36   BOOST_TEST
37       (
38       BOOST_VMD_IS_ARRAY(AN_EMPTY_ARRAY)
39       );
40 #endif
41 
42 #else
43 
44 BOOST_ERROR("No variadic macro support");
45 
46 #endif
47 
48   return boost::report_errors();
49 
50   }
51