// Copyright Louis Dionne 2013-2016 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #include #include #include #include namespace hana = boost::hana; constexpr auto tuples = hana::make_tuple( hana::make_tuple(1, 2, 3), hana::make_tuple('a', 'b'), hana::make_tuple(hana::type_c, hana::type_c) ); constexpr auto prod = hana::make_tuple( hana::make_tuple(1, 'a', hana::type_c), hana::make_tuple(1, 'a', hana::type_c), hana::make_tuple(1, 'b', hana::type_c), hana::make_tuple(1, 'b', hana::type_c), hana::make_tuple(2, 'a', hana::type_c), hana::make_tuple(2, 'a', hana::type_c), hana::make_tuple(2, 'b', hana::type_c), hana::make_tuple(2, 'b', hana::type_c), hana::make_tuple(3, 'a', hana::type_c), hana::make_tuple(3, 'a', hana::type_c), hana::make_tuple(3, 'b', hana::type_c), hana::make_tuple(3, 'b', hana::type_c) ); static_assert(hana::cartesian_product(tuples) == prod, ""); int main() { }