/*============================================================================= Copyright (c) 2011-2016 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_POP_FRONT_HPP #define SPROUT_TUPLE_OPERATION_POP_FRONT_HPP #include #include #include #include #include namespace sprout { namespace tuples { namespace results { // // pop_front // template struct pop_front : public sprout::types::pop_front {}; } // namespace results namespace detail { template inline SPROUT_CONSTEXPR Result pop_front_impl(Tuple const& t, sprout::index_tuple) { return sprout::tuples::remake( t, sprout::tuples::get(t)... ); } } // namespace detail // // pop_front // template inline SPROUT_CONSTEXPR typename sprout::tuples::results::pop_front::type pop_front(Tuple const& t) { return sprout::tuples::detail::pop_front_impl::type>( t, sprout::index_range<1, sprout::tuples::tuple_size::value>::make() ); } } // namespace tuples } // namespace sprout #endif // #ifndef SPROUT_TUPLE_OPERATION_POP_FRONT_HPP