]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/test/sequence/size.cpp
1 /*=============================================================================
2 Copyright (c) 2014 Kohei Takahashi
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #include <boost/config.hpp>
8 #include <boost/fusion/container/vector.hpp>
9 #include <boost/fusion/container/deque.hpp>
10 #include <boost/fusion/container/list.hpp>
11 #include <boost/fusion/container/set.hpp>
12 #include <boost/fusion/container/map.hpp>
13 #include <boost/fusion/support/pair.hpp>
14 #include <boost/fusion/sequence/intrinsic/size.hpp>
15 #include <boost/type_traits/is_same.hpp>
16 #include <boost/mpl/assert.hpp>
18 #include <boost/array.hpp>
19 #include <boost/fusion/adapted/boost_array.hpp>
20 #include <boost/tuple/tuple.hpp>
21 #include <boost/fusion/adapted/boost_tuple.hpp>
22 #if !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
23 !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
25 #include <boost/fusion/adapted/std_tuple.hpp>
28 template <typename LHS
, typename RHS
>
29 void check_(LHS
const&, RHS
const&)
31 BOOST_MPL_ASSERT((boost::is_same
<LHS
, RHS
>));
38 boost::fusion::result_of::size
<S
>::type::value
39 , boost::fusion::result_of::size
<S
>::value
46 check
<boost::fusion::vector
<> >();
47 check
<boost::fusion::vector
<int> >();
48 check
<boost::fusion::vector
<int, int> >();
49 check
<boost::fusion::vector
<int, int, int> >();
53 check
<boost::fusion::deque
<> >();
54 check
<boost::fusion::deque
<int> >();
55 check
<boost::fusion::deque
<int, int> >();
56 check
<boost::fusion::deque
<int, int, int> >();
60 check
<boost::fusion::list
<> >();
61 check
<boost::fusion::list
<int> >();
62 check
<boost::fusion::list
<int, int> >();
63 check
<boost::fusion::list
<int, int, int> >();
67 check
<boost::fusion::set
<> >();
68 check
<boost::fusion::set
<int> >();
69 check
<boost::fusion::set
<int, float> >();
70 check
<boost::fusion::set
<int, float, double> >();
74 check
<boost::fusion::map
<> >();
75 check
<boost::fusion::map
<boost::fusion::pair
<int, int> > >();
76 check
<boost::fusion::map
<boost::fusion::pair
<int, int> , boost::fusion::pair
<float, int> > >();
77 check
<boost::fusion::map
<boost::fusion::pair
<int, int> , boost::fusion::pair
<float, int> , boost::fusion::pair
<double, int> > >();
81 check
<boost::array
<int, 1> >();
82 check
<boost::array
<int, 2> >();
83 check
<boost::array
<int, 3> >();
87 check
<boost::tuples::tuple
<> >();
88 check
<boost::tuples::tuple
<int> >();
89 check
<boost::tuples::tuple
<int, int> >();
90 check
<boost::tuples::tuple
<int, int, int> >();
93 #if !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
94 !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
96 check
<std::tuple
<> >();
97 check
<std::tuple
<int> >();
98 check
<std::tuple
<int, int> >();
99 check
<std::tuple
<int, int, int> >();