]> git.sesse.net Git - casparcg/blob - dependencies/boost/boost/fusion/view/reverse_view/detail/next_impl.hpp
Manually merged pull request #222
[casparcg] / dependencies / boost / boost / fusion / view / reverse_view / detail / next_impl.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2011 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(FUSION_NEXT_IMPL_07202005_0856)
8 #define FUSION_NEXT_IMPL_07202005_0856
9
10 #include <boost/fusion/iterator/next.hpp>
11 #include <boost/fusion/iterator/prior.hpp>
12
13 namespace boost { namespace fusion
14 {
15     struct reverse_view_iterator_tag;
16
17     template <typename Iterator>
18     struct reverse_view_iterator;
19
20     namespace extension
21     {
22         template <>
23         struct next_impl<reverse_view_iterator_tag>
24         {
25             template <typename Iterator>
26             struct apply
27             {
28                 typedef typename Iterator::first_type first_type;
29                 typedef typename prior_impl<typename first_type::fusion_tag>::
30                     template apply<first_type>
31                 wrapped;
32     
33                 typedef reverse_view_iterator<typename wrapped::type> type;
34     
35                 static type
36                 call(Iterator const& i)
37                 {
38                     return type(wrapped::call(i.first));
39                 }
40             };
41         };
42     }
43 }}
44
45 #endif
46
47