#ifndef SPROUT_TUPLE_OPERATION_PUSH_BACK_HPP #define SPROUT_TUPLE_OPERATION_PUSH_BACK_HPP #include #include #include #include #include namespace sprout { namespace tuples { namespace result_of { // // push_back // template struct push_back : public sprout::types::push_back {}; } // namespace result_of namespace detail { template SPROUT_CONSTEXPR inline Result push_back_impl( Tuple const& t, T const& v, sprout::index_tuple ) { return sprout::tuples::remake_clone( t, sprout::tuples::get(t)..., v ); } } // namespace detail // // push_back // template SPROUT_CONSTEXPR inline typename sprout::tuples::result_of::push_back::type push_back( Tuple const& t, T const& v ) { return sprout::tuples::detail::push_back_impl::type>( t, v, typename sprout::index_range<0, sprout::tuples::tuple_size::value>::type() ); } } // namespace tuples } // namespace sprout #endif // #ifndef SPROUT_TUPLE_OPERATION_PUSH_BACK_HPP