product.cpp 842 B

1234567891011121314151617181920212223242526272829
  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/first.hpp>
  7. #include <boost/hana/pair.hpp>
  8. #include <boost/hana/second.hpp>
  9. #include <boost/hana/tuple.hpp>
  10. #include <laws/base.hpp>
  11. #include <laws/product.hpp>
  12. namespace hana = boost::hana;
  13. using hana::test::ct_eq;
  14. int main() {
  15. // first, second
  16. {
  17. hana::pair<ct_eq<1>, ct_eq<2>> p;
  18. BOOST_HANA_CONSTANT_CHECK(hana::equal(hana::first(p), ct_eq<1>{}));
  19. BOOST_HANA_CONSTANT_CHECK(hana::equal(hana::second(p), ct_eq<2>{}));
  20. }
  21. hana::test::TestProduct<hana::pair_tag>{hana::make_tuple(
  22. ct_eq<3>{}, ct_eq<4>{}, ct_eq<5>{}
  23. )};
  24. }