special.prepend.cpp 1.0 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright Louis Dionne 2013-2017
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  4. #include <boost/hana/assert.hpp>
  5. #include <boost/hana/equal.hpp>
  6. #include <boost/hana/integral_constant.hpp>
  7. #include <boost/hana/prepend.hpp>
  8. #include <boost/hana/tuple.hpp>
  9. namespace hana = boost::hana;
  10. int main() {
  11. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  12. hana::prepend(hana::tuple_c<long>, hana::long_c<0>),
  13. hana::tuple_c<long, 0>
  14. ));
  15. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  16. hana::prepend(hana::tuple_c<unsigned int, 1>, hana::uint_c<0>),
  17. hana::tuple_c<unsigned int, 0, 1>
  18. ));
  19. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  20. hana::prepend(hana::tuple_c<long long, 1, 2>, hana::llong_c<0>),
  21. hana::tuple_c<long long, 0, 1, 2>
  22. ));
  23. BOOST_HANA_CONSTANT_CHECK(hana::equal(
  24. hana::prepend(hana::tuple_c<unsigned long, 1, 2, 3>, hana::ulong_c<0>),
  25. hana::tuple_c<unsigned long, 0, 1, 2, 3>
  26. ));
  27. }