// Copyright Louis Dionne 2013-2017 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #ifndef BOOST_HANA_TEST_LAWS_PRODUCT_HPP #define BOOST_HANA_TEST_LAWS_PRODUCT_HPP #include #include #include #include #include #include #include #include namespace boost { namespace hana { namespace test { template > struct TestProduct : TestProduct { using TestProduct::TestProduct; }; template struct TestProduct { template TestProduct(Elements elements) { foreach2(elements, [](auto x, auto y) { static_assert(Product(x, y))>{}, ""); BOOST_HANA_CHECK(hana::equal( hana::first(hana::make

(x, y)), x )); BOOST_HANA_CHECK(hana::equal( hana::second(hana::make

(x, y)), y )); }); } }; }}} // end namespace boost::hana::test #endif // !BOOST_HANA_TEST_LAWS_PRODUCT_HPP