/* @copyright Louis Dionne 2014 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 #include #include using namespace boost::hana; template constexpr auto x = detail::minimal::comparable<>(i); template struct _f { template constexpr auto operator()(X x) const { return std::make_tuple(i, j, x); } }; template constexpr _f f{}; int main() { BOOST_HANA_STATIC_ASSERT(Functor::laws::check( list( std::make_tuple(), std::make_tuple(x<0>), std::make_tuple(x<0>, x<1>), std::make_tuple(x<0>, x<1>, x<2>) ), list( f<1, 1>, f<1, 2> ), list( f<2, 1>, f<2, 2> ) )); }