fix doc example typo
[boost.git] / boost / fusion / container / list / detail / value_at_impl.hpp
blob5f0ff1663bf6fbc8540d4202f6f89a5c03762699
1 /*=============================================================================
2 Copyright (c) 2001-2006 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_VALUE_AT_IMPL_07172005_0952)
8 #define FUSION_VALUE_AT_IMPL_07172005_0952
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>
15 namespace boost { namespace fusion
17 struct cons_tag;
19 namespace extension
21 template <typename Tag>
22 struct value_at_impl;
24 template <>
25 struct value_at_impl<cons_tag>
27 template <typename Sequence, typename N>
28 struct apply
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;
42 #endif