]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/vmd/test/test_tuple_to_array.cxx
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / vmd / test / test_tuple_to_array.cxx
1
2 // (C) Copyright Edward Diener 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/to_array.hpp>
8 #include <boost/vmd/is_empty_array.hpp>
9 #include <boost/detail/lightweight_test.hpp>
10 #include <boost/preprocessor/array/elem.hpp>
11
12 int main()
13 {
14
15 #if BOOST_PP_VARIADICS
16
17 #define A_TUPLE (1,2,3,4)
18 #define AN_EMPTY_TUPLE
19
20 BOOST_TEST_EQ(BOOST_PP_ARRAY_ELEM(3,BOOST_VMD_TUPLE_TO_ARRAY(A_TUPLE)),4);
21 BOOST_TEST(BOOST_VMD_IS_EMPTY_ARRAY(BOOST_VMD_TUPLE_TO_ARRAY(AN_EMPTY_TUPLE)));
22
23 #else
24
25 BOOST_ERROR("No variadic macro support");
26
27 #endif
28
29 return boost::report_errors();
30
31 }