mp_third.cpp 673 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2015 Peter Dimov.
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. //
  5. // See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt
  7. #include <boost/core/lightweight_test_trait.hpp>
  8. #include <boost/mp11/list.hpp>
  9. #include <type_traits>
  10. #include <tuple>
  11. #include <utility>
  12. int main()
  13. {
  14. using boost::mp11::mp_list;
  15. using boost::mp11::mp_third;
  16. using L1 = mp_list<int[], void, float[]>;
  17. BOOST_TEST_TRAIT_TRUE((std::is_same<mp_third<L1>, float[]>));
  18. using L2 = std::tuple<int, float, char>;
  19. BOOST_TEST_TRAIT_TRUE((std::is_same<mp_third<L2>, char>));
  20. return boost::report_errors();
  21. }