• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2015,2018 Kohei Takahashi
3 
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 
9 #ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
10 #   error "does not meet requirements"
11 #endif
12 
13 #include <boost/fusion/support/detail/index_sequence.hpp>
14 #include <boost/mpl/assert.hpp>
15 #include <boost/type_traits/is_same.hpp>
16 
17 using namespace boost::fusion;
18 
19 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<0>::type, detail::index_sequence<> >));
20 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<1>::type, detail::index_sequence<0> >));
21 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<2>::type, detail::index_sequence<0, 1> >));
22 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<3>::type, detail::index_sequence<0, 1, 2> >));
23 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<4>::type, detail::index_sequence<0, 1, 2, 3> >));
24 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<5>::type, detail::index_sequence<0, 1, 2, 3, 4> >));
25 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<6>::type, detail::index_sequence<0, 1, 2, 3, 4, 5> >));
26 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<7>::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6> >));
27 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<8>::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7> >));
28 
29 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<15>::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14> >));
30 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<16>::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15> >));
31 BOOST_MPL_ASSERT((boost::is_same<detail::make_index_sequence<17>::type, detail::index_sequence<0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16> >));
32 
33