/*============================================================================= Copyright (c) 2011-2015 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_OPERATION_PUSH_FRONT_HPP #define SPROUT_TUPLE_OPERATION_PUSH_FRONT_HPP #include #include #include #include #include #include namespace sprout { namespace tuples { namespace results { // // push_front // template struct push_front : public sprout::types::push_front {}; } // namespace results namespace detail { template inline SPROUT_CONSTEXPR Result push_front_impl(Tuple const& t, sprout::index_tuple, Args const&... args) { return sprout::tuples::remake( t, args..., sprout::tuples::get(t)... ); } } // namespace detail // // push_front // template inline SPROUT_CONSTEXPR typename sprout::tuples::results::push_front::type push_front(Tuple const& t, Args const&... args) { return sprout::tuples::detail::push_front_impl::type>( t, sprout::tuple_indexes::make(), args... ); } } // namespace tuples } // namespace sprout #endif // #ifndef SPROUT_TUPLE_OPERATION_PUSH_FRONT_HPP