2 // Copyright 2017, 2019 Peter Dimov.
4 // Distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
10 #include <boost/mp11/mpl_list.hpp>
11 #include <boost/mp11/list.hpp>
13 #include <boost/mpl/at.hpp>
14 #include <boost/mpl/size.hpp>
16 #include <boost/core/lightweight_test_trait.hpp>
20 namespace mpl = boost::mpl;
21 using namespace boost::mp11;
23 using L1 = mp_list<void, int, float>;
25 BOOST_TEST_TRAIT_TRUE((std::is_same<typename mpl::at<L1, mpl::int_<0>>::type, mp_at_c<L1, 0>>));
26 BOOST_TEST_TRAIT_TRUE((std::is_same<typename mpl::at<L1, mpl::int_<1>>::type, mp_at_c<L1, 1>>));
27 BOOST_TEST_TRAIT_TRUE((std::is_same<typename mpl::at<L1, mpl::int_<2>>::type, mp_at_c<L1, 2>>));
29 BOOST_TEST_TRAIT_TRUE((std::is_same<typename mpl::at_c<L1, 0>::type, mp_at_c<L1, 0>>));
30 BOOST_TEST_TRAIT_TRUE((std::is_same<typename mpl::at_c<L1, 1>::type, mp_at_c<L1, 1>>));
31 BOOST_TEST_TRAIT_TRUE((std::is_same<typename mpl::at_c<L1, 2>::type, mp_at_c<L1, 2>>));
33 BOOST_TEST_EQ((mpl::size<L1>::type::value), mp_size<L1>::value);
35 return boost::report_errors();