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