~ubuntu-branches/debian/sid/boost1.49/sid

« back to all changes in this revision

Viewing changes to libs/fusion/example/extension/detail/value_of_impl.hpp

  • Committer: Package Import Robot
  • Author(s): Steve M. Robbins
  • Date: 2012-02-26 00:31:44 UTC
  • Revision ID: package-import@ubuntu.com-20120226003144-eaytp12cbf6ubpms
Tags: upstream-1.49.0
ImportĀ upstreamĀ versionĀ 1.49.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*=============================================================================
 
2
    Copyright (c) 2001-2011 Joel de Guzman
 
3
    Copyright (c) 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_OF_IMPL_20060223_1905)
 
9
#define BOOST_FUSION_VALUE_OF_IMPL_20060223_1905
 
10
 
 
11
#include <string>
 
12
 
 
13
namespace example
 
14
{
 
15
    struct example_struct_iterator_tag;
 
16
 
 
17
    template<typename Struct, int Pos>
 
18
    struct example_struct_iterator;
 
19
}
 
20
 
 
21
namespace boost { namespace fusion {
 
22
 
 
23
    namespace extension
 
24
    {
 
25
        template<typename Tag>
 
26
        struct value_of_impl;
 
27
 
 
28
        template<>
 
29
        struct value_of_impl<example::example_struct_iterator_tag>
 
30
        {
 
31
            template<typename Iterator>
 
32
            struct apply;
 
33
 
 
34
            template<typename Struct>
 
35
            struct apply<example::example_struct_iterator<Struct, 0> >
 
36
            {
 
37
                typedef std::string type;
 
38
            };
 
39
 
 
40
            template<typename Struct>
 
41
            struct apply<example::example_struct_iterator<Struct, 1> >
 
42
            {
 
43
                typedef int type;
 
44
            };
 
45
        };
 
46
    }
 
47
}}
 
48
 
 
49
#endif