Last change
on this file since 29 was
29,
checked in by landauf, 17 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
1.3 KB
|
Line | |
---|
1 | /*============================================================================= |
---|
2 | Copyright (c) 2001-2003 Joel de Guzman |
---|
3 | Copyright (c) 2004 Peder Holt |
---|
4 | |
---|
5 | Use, modification and distribution is subject to the Boost Software |
---|
6 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
---|
7 | http://www.boost.org/LICENSE_1_0.txt) |
---|
8 | ==============================================================================*/ |
---|
9 | #if !defined(FUSION_SEQUENCE_VALUE_AT_HPP) |
---|
10 | #define FUSION_SEQUENCE_VALUE_AT_HPP |
---|
11 | |
---|
12 | #include <boost/spirit/fusion/detail/config.hpp> |
---|
13 | #include <boost/spirit/fusion/sequence/as_fusion_sequence.hpp> |
---|
14 | |
---|
15 | namespace boost { namespace fusion |
---|
16 | { |
---|
17 | namespace meta |
---|
18 | { |
---|
19 | template <typename Tag> |
---|
20 | struct value_at_impl |
---|
21 | { |
---|
22 | template <typename Sequence, int N> |
---|
23 | struct apply { |
---|
24 | typedef int type; |
---|
25 | }; |
---|
26 | }; |
---|
27 | |
---|
28 | template <typename Sequence, int N> |
---|
29 | struct value_at_c |
---|
30 | { |
---|
31 | typedef as_fusion_sequence<Sequence> seq_converter; |
---|
32 | typedef typename seq_converter::type seq; |
---|
33 | |
---|
34 | typedef typename |
---|
35 | value_at_impl<FUSION_GET_TAG(seq)>:: |
---|
36 | template apply<seq, N>::type |
---|
37 | type; |
---|
38 | }; |
---|
39 | |
---|
40 | template <typename Sequence, typename N> |
---|
41 | struct value_at : value_at_c<Sequence, N::value> {}; |
---|
42 | } |
---|
43 | }} |
---|
44 | |
---|
45 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.