]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/vmd/test/test_tuple_pop_back.cxx
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / vmd / test / test_tuple_pop_back.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/pop_back.hpp>
8 #include <boost/vmd/is_empty.hpp>
9 #include <boost/preprocessor/tuple/elem.hpp>
10 #include <boost/preprocessor/tuple/size.hpp>
11 #include <boost/detail/lightweight_test.hpp>
12
13 int main()
14 {
15
16 #if BOOST_PP_VARIADICS
17
18 #define A_TUPLE (1,2,3,4)
19 #define AN_SE_TUPLE (1)
20
21 BOOST_TEST_EQ(BOOST_PP_TUPLE_ELEM(2,BOOST_VMD_TUPLE_POP_BACK(A_TUPLE)),3);
22 BOOST_TEST_EQ(BOOST_PP_TUPLE_SIZE(BOOST_VMD_TUPLE_POP_BACK(A_TUPLE)),3);
23 BOOST_TEST(BOOST_VMD_IS_EMPTY(BOOST_VMD_TUPLE_POP_BACK(AN_SE_TUPLE)));
24
25 #else
26
27 BOOST_ERROR("No variadic macro support");
28
29 #endif
30
31 return boost::report_errors();
32
33 }