Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:34:42

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(FUSION_PRIOR_05042005_1144)
0008 #define FUSION_PRIOR_05042005_1144
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/tag_of.hpp>
0012 
0013 namespace boost { namespace fusion
0014 {
0015     // Special tags:
0016     struct iterator_facade_tag; // iterator facade tag
0017     struct boost_array_iterator_tag; // boost::array iterator tag
0018     struct mpl_iterator_tag; // mpl sequence iterator tag
0019     struct std_pair_iterator_tag; // std::pair iterator tag
0020 
0021     namespace extension
0022     {
0023         template <typename Tag>
0024         struct prior_impl
0025         {
0026             template <typename Iterator>
0027             struct apply {};
0028         };
0029 
0030         template <>
0031         struct prior_impl<iterator_facade_tag>
0032         {
0033             template <typename Iterator>
0034             struct apply : Iterator::template prior<Iterator> {};
0035         };
0036 
0037         template <>
0038         struct prior_impl<boost_array_iterator_tag>;
0039 
0040         template <>
0041         struct prior_impl<mpl_iterator_tag>;
0042 
0043         template <>
0044         struct prior_impl<std_pair_iterator_tag>;
0045     }
0046 
0047     namespace result_of
0048     {
0049         template <typename Iterator>
0050         struct prior
0051             : extension::prior_impl<typename detail::tag_of<Iterator>::type>::
0052                 template apply<Iterator>
0053         {};
0054     }
0055 
0056     template <typename Iterator>
0057     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0058     inline typename result_of::prior<Iterator>::type const
0059     prior(Iterator const& i)
0060     {
0061         return result_of::prior<Iterator>::call(i);
0062     }
0063 }}
0064 
0065 #endif