• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2001-2011 Joel de Guzman
3     Copyright (c) 2005-2006 Dan Marsden
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(BOOST_FUSION_VALUE_AT_KEY_IMPL_20060223_2025)
9 #define BOOST_FUSION_VALUE_AT_KEY_IMPL_20060223_2025
10 
11 namespace fields
12 {
13     struct name;
14     struct age;
15 }
16 
17 namespace example
18 {
19     struct example_sequence_tag;
20 }
21 
22 namespace boost { namespace fusion {
23 
24     namespace extension
25     {
26         template<typename Tag>
27         struct value_at_key_impl;
28 
29         template<>
30         struct value_at_key_impl<example::example_sequence_tag>
31         {
32             template<typename Sequence, typename N>
33             struct apply;
34 
35             template<typename Sequence>
36             struct apply<Sequence, fields::name>
37             {
38                 typedef std::string type;
39             };
40 
41             template<typename Sequence>
42             struct apply<Sequence, fields::age>
43             {
44                 typedef int type;
45             };
46         };
47     }
48 }}
49 
50 #endif
51