]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/view/single_view/detail/prior_impl.hpp
Updated boost to v1.55.0
[rsem.git] / boost / fusion / view / single_view / detail / prior_impl.hpp
1 /*=============================================================================
2     Copyright (c) 2011 Eric Niebler
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(BOOST_FUSION_SINGLE_VIEW_PRIOR_IMPL_JUL_07_2011_1348PM)
8 #define BOOST_FUSION_SINGLE_VIEW_PRIOR_IMPL_JUL_07_2011_1348PM
9
10 #include <boost/mpl/prior.hpp>
11
12 namespace boost { namespace fusion
13 {
14     struct single_view_iterator_tag;
15
16     template <typename Sequence, typename Pos>
17     struct single_view_iterator;
18
19     namespace extension
20     {
21         template <typename Tag>
22         struct prior_impl;
23
24         template <>
25         struct prior_impl<single_view_iterator_tag>
26         {
27             template <typename Iterator>
28             struct apply 
29             {
30                 typedef single_view_iterator<
31                     typename Iterator::single_view_type,
32                     typename mpl::prior<typename Iterator::position>::type>
33                 type;
34
35                 static type
36                 call(Iterator const& i)
37                 {
38                     return type(i.view);
39                 }
40             };
41         };
42     }
43
44 }}
45
46 #endif