]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/container/list/detail/value_at_impl.hpp
Updated boost to v1.55.0
[rsem.git] / boost / fusion / container / list / detail / value_at_impl.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2011 Joel de Guzman
3
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_VALUE_AT_IMPL_07172005_0952)
8 #define FUSION_VALUE_AT_IMPL_07172005_0952
9
10 #include <boost/fusion/support/detail/access.hpp>
11 #include <boost/type_traits/is_const.hpp>
12 #include <boost/mpl/eval_if.hpp>
13 #include <boost/mpl/bool.hpp>
14
15 namespace boost { namespace fusion
16 {
17     struct cons_tag;
18
19     namespace extension
20     {
21         template <typename Tag>
22         struct value_at_impl;
23
24         template <>
25         struct value_at_impl<cons_tag>
26         {
27             template <typename Sequence, typename N>
28             struct apply 
29             {
30                 typedef typename 
31                     mpl::eval_if<
32                         mpl::bool_<N::value == 0>
33                       , mpl::identity<typename Sequence::car_type>
34                       , apply<typename Sequence::cdr_type, mpl::int_<N::value-1> >
35                     >::type
36                 type;
37             };
38         };
39     }
40 }}
41
42 #endif