3 Defines `boost::hana::detail::create`.
5 @copyright Louis Dionne 2013-2016
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_DETAIL_CREATE_HPP
11 #define BOOST_HANA_DETAIL_CREATE_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/detail/decay.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN namespace detail {
18 //! @ingroup group-details
19 //! Implementation of the generic `std::make_xxx` pattern for arbitrary
21 template <template <typename ...> class T>
23 template <typename ...X>
24 constexpr T<typename detail::decay<X>::type...>
25 operator()(X&& ...x) const {
26 return T<typename detail::decay<X>::type...>{
27 static_cast<X&&>(x)...
31 } BOOST_HANA_NAMESPACE_END
33 #endif // !BOOST_HANA_DETAIL_CREATE_HPP