mp_clear.cpp 685 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2015, 2017 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/mp11/list.hpp>
  8. #include <boost/core/lightweight_test_trait.hpp>
  9. #include <type_traits>
  10. #include <tuple>
  11. int main()
  12. {
  13. using boost::mp11::mp_list;
  14. using boost::mp11::mp_clear;
  15. using L1 = mp_list<int, void(), float[]>;
  16. BOOST_TEST_TRAIT_TRUE((std::is_same<mp_clear<L1>, mp_list<>>));
  17. //
  18. using L2 = std::tuple<int, char, float>;
  19. BOOST_TEST_TRAIT_TRUE((std::is_same<mp_clear<L2>, std::tuple<>>));
  20. //
  21. return boost::report_errors();
  22. }