/*============================================================================= Copyright (c) 2011-2017 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #ifndef SPROUT_TUPLE_MAKE_FROM_TUPLE_HPP #define SPROUT_TUPLE_MAKE_FROM_TUPLE_HPP #include #include #include #include #include #include namespace sprout { namespace tuples { // // make_from_tuple // namespace detail { template inline SPROUT_CONSTEXPR T make_from_tuple_impl(Tuple&& t, sprout::index_tuple) { return T(sprout::get(SPROUT_FORWARD(Tuple, t))...); } } // namespace detail template inline SPROUT_CONSTEXPR T make_from_tuple(Tuple&& t) { return sprout::tuples::detail::make_from_tuple_impl( SPROUT_FORWARD(Tuple, t), sprout::tuple_indexes::type>::make() ); } } // namespace tuples using sprout::tuples::make_from_tuple; } // namespace sprout #endif // #ifndef SPROUT_TUPLE_MAKE_FROM_TUPLE_HPP