]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/vmd/test/test_tuple_push_back.cxx
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).
7 #include <boost/vmd/tuple/push_back.hpp>
8 #include <boost/preprocessor/tuple/elem.hpp>
9 #include <boost/preprocessor/tuple/size.hpp>
10 #include <boost/detail/lightweight_test.hpp>
15 #if BOOST_PP_VARIADICS
17 #define A_TUPLE (1,2,3,4)
18 #define AN_EMPTY_TUPLE
20 BOOST_TEST_EQ(BOOST_PP_TUPLE_ELEM(4,BOOST_VMD_TUPLE_PUSH_BACK(A_TUPLE
,10)),10);
21 BOOST_TEST_EQ(BOOST_PP_TUPLE_SIZE(BOOST_VMD_TUPLE_PUSH_BACK(A_TUPLE
,10)),5);
22 BOOST_TEST_EQ(BOOST_PP_TUPLE_ELEM(0,BOOST_VMD_TUPLE_PUSH_BACK(AN_EMPTY_TUPLE
,20)),20);
23 BOOST_TEST_EQ(BOOST_PP_TUPLE_SIZE(BOOST_VMD_TUPLE_PUSH_BACK(AN_EMPTY_TUPLE
,20)),1);
27 BOOST_ERROR("No variadic macro support");
31 return boost::report_errors();