PageRenderTime 19ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/fusion/container/list/detail/end_impl.hpp

http://hadesmem.googlecode.com/
C++ Header | 51 lines | 35 code | 9 blank | 7 comment | 0 complexity | 90bc1c27da223df191e7867c6264cbc4 MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2005 Joel de Guzman
 3    Copyright (c) 2005 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#if !defined(FUSION_END_IMPL_07172005_0828)
 9#define FUSION_END_IMPL_07172005_0828
10
11#include <boost/mpl/if.hpp>
12#include <boost/type_traits/is_const.hpp>
13
14namespace boost { namespace fusion
15{
16    struct nil;
17
18    struct cons_tag;
19
20    template <typename Car, typename Cdr>
21    struct cons;
22
23    template <typename Cons>
24    struct cons_iterator;
25
26    namespace extension
27    {
28        template <typename Tag>
29        struct end_impl;
30
31        template <>
32        struct end_impl<cons_tag>
33        {
34            template <typename Sequence>
35            struct apply 
36            {
37                typedef cons_iterator<
38                    typename mpl::if_<is_const<Sequence>, nil const, nil>::type>
39                type;
40    
41                static type
42                call(Sequence&)
43                {
44                    return type();
45                }
46            };
47        };
48    }
49}}
50
51#endif