1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
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_PRIOR_05042005_1144)
8 #define FUSION_PRIOR_05042005_1144
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/support/tag_of.hpp>
13 namespace boost { namespace fusion
16 struct iterator_facade_tag; // iterator facade tag
17 struct boost_array_iterator_tag; // boost::array iterator tag
18 struct mpl_iterator_tag; // mpl sequence iterator tag
19 struct std_pair_iterator_tag; // std::pair iterator tag
23 template <typename Tag>
26 template <typename Iterator>
31 struct prior_impl<iterator_facade_tag>
33 template <typename Iterator>
34 struct apply : Iterator::template prior<Iterator> {};
38 struct prior_impl<boost_array_iterator_tag>;
41 struct prior_impl<mpl_iterator_tag>;
44 struct prior_impl<std_pair_iterator_tag>;
49 template <typename Iterator>
51 : extension::prior_impl<typename detail::tag_of<Iterator>::type>::
52 template apply<Iterator>
56 template <typename Iterator>
57 BOOST_FUSION_GPU_ENABLED
58 typename result_of::prior<Iterator>::type const
59 prior(Iterator const& i)
61 return result_of::prior<Iterator>::call(i);