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