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)
5 #include <boost/hana/config.hpp>
6 #include <boost/hana/detail/create.hpp>
10 namespace hana = boost::hana;
13 constexpr hana::detail::create<std::tuple> make_tuple{};
14 constexpr hana::detail::create<std::pair> make_pair{};
16 template <typename ...>
20 struct single_holder { T x; };
23 struct identity { using type = T; };
25 template <typename ...T>
26 using identity_t = typename identity<T...>::type;
29 static_assert(make_tuple(1, '2', 3.3) == std::make_tuple(1, '2', 3.3), "");
30 static_assert(make_pair(1, '2') == std::make_pair(1, '2'), "");
33 hana::detail::create<empty>{}();
34 hana::detail::create<single_holder>{}(1);
35 hana::detail::create<single_holder>{}([]{});
36 hana::detail::create<identity_t>{}(1);
37 hana::detail::create<identity_t>{}([]{});