mp_append_2.cpp 879 B

1234567891011121314151617181920212223242526272829303132333435363738
  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/core/lightweight_test_trait.hpp>
  8. #include <boost/mp11/list.hpp>
  9. #include <boost/mp11/algorithm.hpp>
  10. #include <type_traits>
  11. #include <tuple>
  12. #include <utility>
  13. template<class T> struct W;
  14. int main()
  15. {
  16. using boost::mp11::mp_list;
  17. using boost::mp11::mp_append;
  18. using boost::mp11::mp_iota_c;
  19. using boost::mp11::mp_transform;
  20. using boost::mp11::mp_rename;
  21. using boost::mp11::mp_push_front;
  22. using L1 = mp_iota_c<125>;
  23. using L2 = mp_transform<W, L1>;
  24. using L3 = mp_push_front<L2, mp_list<>>;
  25. using L4 = mp_rename<L3, mp_append>;
  26. BOOST_TEST_TRAIT_TRUE((std::is_same<L4, L1>));
  27. //
  28. return boost::report_errors();
  29. }