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 50