#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 result_of { // // append_back // template struct append_back : public sprout::types::append_back {}; } // namespace result_of namespace detail { template SPROUT_CONSTEXPR inline Result append_back_impl( Tuple const& t, InputTuple const& input, sprout::index_tuple, sprout::index_tuple ) { return sprout::tuples::remake_clone( t, sprout::tuples::get(t)..., sprout::tuples::get(input)... ); } } // namespace detail // // append_back // template SPROUT_CONSTEXPR inline typename sprout::tuples::result_of::append_back::type append_back( Tuple const& t, InputTuple const& input ) { return sprout::tuples::detail::append_back_impl::type>( t, input, typename sprout::index_range<0, sprout::tuples::tuple_size::value>::type(), typename sprout::index_range<0, sprout::tuples::tuple_size::value>::type() ); } } // namespace tuples } // namespace sprout #endif // #ifndef SPROUT_TUPLE_OPERATION_APPEND_BACK_HPP