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 5 #include <boost/hana/functional/curry.hpp> 6 #include <boost/hana/functional/partial.hpp> 7 #include <boost/hana/functional/reverse_partial.hpp> 8 #include <boost/hana/tuple.hpp> 9 10 #include <tuple> 11 #include <type_traits> 12 namespace hana = boost::hana; 13 14 15 struct DefaultConstructible { 16 DefaultConstructible() = default; 17 }; 18 main()19int main() { 20 auto curry_tuple = hana::make_tuple( 21 std::make_tuple(hana::curry<2>(DefaultConstructible{})(DefaultConstructible{})) 22 ); 23 24 auto partial_tuple = hana::make_tuple( 25 std::make_tuple(hana::partial(DefaultConstructible{}, DefaultConstructible{})) 26 ); 27 28 auto reverse_partial_tuple = hana::make_tuple( 29 std::make_tuple(hana::reverse_partial(DefaultConstructible{}, DefaultConstructible{})) 30 ); 31 32 static_assert(std::is_default_constructible<decltype(curry_tuple)>::value, ""); 33 static_assert(std::is_default_constructible<decltype(partial_tuple)>::value, ""); 34 static_assert(std::is_default_constructible<decltype(reverse_partial_tuple)>::value, ""); 35 } 36