Project revived from Feb2017
[EroSomnia.git] / deps / boost_1_63_0 / boost / fusion / algorithm / transformation / pop_front.hpp
blob11b7f6ee1b8fb630c0e01ac5edefbbc208ca0020
1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(FUSION_POP_FRONT_09172005_1115)
8 #define FUSION_POP_FRONT_09172005_1115
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/view/iterator_range/iterator_range.hpp>
12 #include <boost/fusion/sequence/intrinsic/begin.hpp>
13 #include <boost/fusion/sequence/intrinsic/end.hpp>
14 #include <boost/fusion/iterator/next.hpp>
16 namespace boost { namespace fusion
18 namespace result_of
20 template <typename Sequence>
21 struct pop_front
23 typedef
24 iterator_range<
25 typename next<
26 typename begin<Sequence>::type
27 >::type
28 , typename end<Sequence>::type
30 type;
34 template <typename Sequence>
35 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
36 inline typename result_of::pop_front<Sequence const>::type
37 pop_front(Sequence const& seq)
39 typedef typename result_of::pop_front<Sequence const>::type result;
40 return result(fusion::next(fusion::begin(seq)), fusion::end(seq));
44 #endif