• 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/tuple/is_vmd_tuple.hpp>
8 #include <boost/detail/lightweight_test.hpp>
9 
main()10 int main()
11   {
12 
13 #if BOOST_PP_VARIADICS
14 
15   #define A_TUPLE (*,#,zz)
16   #define AN_EMPTY_VMD_TUPLE
17 
18 #if !BOOST_VMD_MSVC_V8
19 
20   #define AN_EMPTY_TUPLE ()
21   #define AN_EMPTY_TUPLE_PLUS () 83
22 
23 #endif
24 
25   #define A_TUPLE2 (*,#,(zz,44,(e7)))
26   #define A_TUPLE_PLUS (mmf,34,^^,!) 456
27   #define PLUS_ATUPLE yyt (j,ii%)
28   #define JDATA ggh
29   #define KDATA (ggh)
30   #define NOT_TUPLE y6()
31   #define NOT_TUPLE2 &(kkkgg,(e))
32   #define A_SEQ (r)(%)(#)
33   #define AN_ARRAY (4,(5,7,f,x))
34   #define A_LIST (e,(g,(&,BOOST_PP_NIL)))
35 
36   BOOST_TEST(BOOST_VMD_IS_VMD_TUPLE());
37   BOOST_TEST(BOOST_VMD_IS_VMD_TUPLE(AN_EMPTY_VMD_TUPLE));
38   BOOST_TEST(BOOST_VMD_IS_VMD_TUPLE(A_TUPLE));
39   BOOST_TEST(BOOST_VMD_IS_VMD_TUPLE(A_TUPLE2));
40   BOOST_TEST(!BOOST_VMD_IS_VMD_TUPLE(A_TUPLE_PLUS));
41   BOOST_TEST(!BOOST_VMD_IS_VMD_TUPLE(PLUS_ATUPLE));
42   BOOST_TEST(!BOOST_VMD_IS_VMD_TUPLE(JDATA));
43   BOOST_TEST(BOOST_VMD_IS_VMD_TUPLE(KDATA));
44   BOOST_TEST(!BOOST_VMD_IS_VMD_TUPLE(NOT_TUPLE));
45   BOOST_TEST(!BOOST_VMD_IS_VMD_TUPLE(NOT_TUPLE2));
46   BOOST_TEST(!BOOST_VMD_IS_VMD_TUPLE(A_SEQ));
47   BOOST_TEST(BOOST_VMD_IS_VMD_TUPLE(AN_ARRAY));
48   BOOST_TEST(BOOST_VMD_IS_VMD_TUPLE(A_LIST));
49 
50 #if !BOOST_VMD_MSVC_V8
51 
52   BOOST_TEST(BOOST_VMD_IS_VMD_TUPLE(AN_EMPTY_TUPLE));
53   BOOST_TEST(!BOOST_VMD_IS_VMD_TUPLE(AN_EMPTY_TUPLE_PLUS));
54 
55 #endif
56 
57   BOOST_TEST(!BOOST_VMD_IS_VMD_TUPLE((y)2(x)));
58 
59 #else
60 
61 BOOST_ERROR("No variadic macro support");
62 
63 #endif
64 
65   return boost::report_errors();
66 
67   }
68