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