]> git.lyx.org Git - lyx.git/blob - 3rdparty/boost/boost/fusion/container/list/detail/end_impl.hpp
Update to boost 1.72
[lyx.git] / 3rdparty / boost / boost / fusion / container / list / detail / end_impl.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2011 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/fusion/support/config.hpp>
12 #include <boost/mpl/if.hpp>
13 #include <boost/type_traits/is_const.hpp>
14
15 namespace boost { namespace fusion
16 {
17     struct nil_;
18
19     struct cons_tag;
20
21     template <typename Car, typename Cdr>
22     struct cons;
23
24     template <typename Cons>
25     struct cons_iterator;
26
27     namespace extension
28     {
29         template <typename Tag>
30         struct end_impl;
31
32         template <>
33         struct end_impl<cons_tag>
34         {
35             template <typename Sequence>
36             struct apply
37             {
38                 typedef cons_iterator<
39                     typename mpl::if_<is_const<Sequence>, nil_ const, nil_>::type>
40                 type;
41
42                 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
43                 static type
44                 call(Sequence&)
45                 {
46                     return type();
47                 }
48             };
49         };
50     }
51 }}
52
53 #endif