]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2001-2013 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(BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_02042013_0821) | |
8 | #define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_02042013_0821 | |
9 | ||
10 | #include <boost/fusion/support/config.hpp> | |
11 | #include <boost/mpl/at.hpp> | |
12 | #include <boost/utility/declval.hpp> | |
13 | ||
14 | namespace boost { namespace fusion | |
15 | { | |
16 | struct map_tag; | |
17 | ||
18 | namespace extension | |
19 | { | |
20 | template <typename Tag> | |
21 | struct value_at_impl; | |
22 | ||
23 | template <> | |
24 | struct value_at_impl<map_tag> | |
25 | { | |
26 | template <typename Sequence, typename N> | |
27 | struct apply | |
28 | { | |
29 | typedef mpl::int_<N::value> index; | |
30 | typedef | |
31 | decltype(boost::declval<Sequence>().get_val(index())) | |
32 | type; | |
33 | }; | |
34 | }; | |
35 | } | |
36 | }} | |
37 | ||
38 | #endif | |
39 |