PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/proto/detail/pop_front.hpp

http://hadesmem.googlecode.com/
C++ Header | 43 lines | 32 code | 4 blank | 7 comment | 0 complexity | d699d1311c35bd7c7f1f2755d9633c43 MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2006 Joel de Guzman
 3    Copyright (c) 2008 Eric Niebler
 4
 5    Distributed under the Boost Software License, Version 1.0. (See accompanying
 6    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 7==============================================================================*/
 8#ifndef BOOST_PROTO_DETAIL_FUSION_POP_FRONT_EAH_01_22_2008
 9#define BOOST_PROTO_DETAIL_FUSION_POP_FRONT_EAH_01_22_2008
10
11#include <boost/spirit/fusion/sequence/range.hpp>
12#include <boost/spirit/fusion/sequence/begin.hpp>
13#include <boost/spirit/fusion/sequence/end.hpp>
14#include <boost/spirit/fusion/iterator/next.hpp>
15
16namespace boost { namespace fusion
17{
18    namespace meta
19    {
20        template <typename Sequence>
21        struct pop_front
22        {
23            typedef
24                range<
25                    typename next<
26                        typename begin<Sequence>::type
27                    >::type
28                  , typename end<Sequence>::type
29                >
30            type;
31        };
32    }
33
34    template <typename Sequence>
35    inline typename meta::pop_front<Sequence const>::type
36    pop_front(Sequence const& seq)
37    {
38        typedef typename meta::pop_front<Sequence const>::type result;
39        return result(fusion::next(fusion::begin(seq)), fusion::end(seq));
40    }
41}}
42
43#endif