/*============================================================================= Copyright (c) 2011-2013 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_APPEND_FRONT_HPP #define SPROUT_TUPLE_OPERATION_APPEND_FRONT_HPP #include #include #include #include #include #include namespace sprout { namespace tuples { namespace results { // // append_front // template struct append_front : public sprout::types::append_front {}; } // namespace results namespace detail { template inline SPROUT_CONSTEXPR Result append_front_impl( Tuple const& t, InputTuple const& input, sprout::index_tuple, sprout::index_tuple ) { return sprout::tuples::remake( t, sprout::tuples::get(input)..., sprout::tuples::get(t)... ); } } // namespace detail // // append_front // template inline SPROUT_CONSTEXPR typename sprout::tuples::results::append_front::type append_front(Tuple const& t, InputTuple const& input) { return sprout::tuples::detail::append_front_impl::type>( t, input, sprout::tuple_indexes::make(), sprout::tuple_indexes::make() ); } } // namespace tuples } // namespace sprout #endif // #ifndef SPROUT_TUPLE_OPERATION_APPEND_FRONT_HPP