• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_ADVANCE_IMPL_20060222_2150)
9 #define BOOST_FUSION_ADVANCE_IMPL_20060222_2150
10 
11 namespace example
12 {
13     struct example_struct_iterator_tag;
14 
15     template<typename Struct, int Pos>
16     struct example_struct_iterator;
17 }
18 
19 namespace boost { namespace fusion {
20 
21     namespace extension
22     {
23         template<typename Tag>
24         struct advance_impl;
25 
26         template<>
27         struct advance_impl<example::example_struct_iterator_tag>
28         {
29             template<typename Iterator, typename N>
30             struct apply
31             {
32                 typedef typename Iterator::struct_type struct_type;
33                 typedef typename Iterator::index index;
34                 typedef example::example_struct_iterator<
35                     struct_type, index::value + N::value> type;
36 
37                 static type
callboost::fusion::extension::advance_impl::apply38                 call(Iterator const& it)
39                 {
40                     return type(it.struct_);
41                 }
42             };
43         };
44     }
45 }}
46 
47 #endif
48