• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 //  Copyright 2015 Peter Dimov.
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 //
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8 
9 
10 #include <boost/core/lightweight_test_trait.hpp>
11 #include <boost/mp11/list.hpp>
12 #include <type_traits>
13 #include <tuple>
14 #include <utility>
15 
main()16 int main()
17 {
18     using boost::mp11::mp_list;
19     using boost::mp11::mp_second;
20 
21     using L1 = mp_list<void, char[]>;
22     BOOST_TEST_TRAIT_TRUE((std::is_same<mp_second<L1>, char[]>));
23 
24     using L2 = mp_list<int[], void, float>;
25     BOOST_TEST_TRAIT_TRUE((std::is_same<mp_second<L2>, void>));
26 
27     using L3 = std::tuple<int, float>;
28     BOOST_TEST_TRAIT_TRUE((std::is_same<mp_second<L3>, float>));
29 
30     using L4 = std::pair<char, double>;
31     BOOST_TEST_TRAIT_TRUE((std::is_same<mp_second<L4>, double>));
32 
33     return boost::report_errors();
34 }
35