SCM Repositories - p-stade


Parent Directory Parent Directory | Revision Log Revision Log


Revision 1807 - (download) (annotate)
Thu Jan 31 07:07:48 2008 UTC (17 months, 1 week ago) by mb2sync
File size: 2169 byte(s)
renaming
    1 #ifndef PSTADE_OVEN_DETAIL_ZIP_ITERATOR_HACK_HPP
    2 #define PSTADE_OVEN_DETAIL_ZIP_ITERATOR_HACK_HPP
    3 #include "./prefix.hpp"
    4 
    5 
    6 // PStade.Oven
    7 //
    8 // Copyright Shunsuke Sogame 2005-2007.
    9 // Distributed under the Boost Software License, Version 1.0.
   10 // (See accompanying file LICENSE_1_0.txt or copy at
   11 // http://www.boost.org/LICENSE_1_0.txt)
   12 
   13 
   14 // What:
   15 //
   16 // Makes Forward*Input*Range zippable.
   17 
   18 
   19 #include <boost/iterator/zip_iterator.hpp>
   20 #include <boost/mpl/placeholders.hpp>
   21 #include <boost/preprocessor/repetition/enum_params.hpp>
   22 #include <boost/tuple/tuple.hpp>
   23 #include <pstade/boost_tuple_config.hpp> // PSTADE_BOOST_TUPLE_MAX_SIZE
   24 #include "./pure_traversal.hpp"
   25 
   26 
   27 namespace pstade { namespace oven { namespace detail {
   28 
   29 
   30     template< class IteratorTuple >
   31     struct minimum_traversal_category_in_iterator_tuple
   32     {
   33         typedef typename
   34             boost::detail::tuple_impl_specific::tuple_meta_transform<
   35                 IteratorTuple,
   36                 pure_traversal<boost::mpl::_1> // modified from boost::iterator_traversal<>
   37             >::type
   38         tuple_of_traversal_tags;
   39 
   40         typedef typename
   41             boost::detail::tuple_impl_specific::tuple_meta_accumulate<
   42                 tuple_of_traversal_tags,
   43                 boost::detail::minimum_category<>,
   44                 boost::random_access_traversal_tag
   45             >::type
   46         type;
   47     };
   48 
   49 
   50 } } } // namespace pstade::oven::detail
   51 
   52 
   53 namespace boost { namespace detail {
   54 
   55 
   56     template< BOOST_PP_ENUM_PARAMS(PSTADE_BOOST_TUPLE_MAX_SIZE, class T) >
   57     struct minimum_traversal_category_in_iterator_tuple< tuples::tuple<BOOST_PP_ENUM_PARAMS(PSTADE_BOOST_TUPLE_MAX_SIZE, T)> > :
   58         pstade::oven::detail::minimum_traversal_category_in_iterator_tuple< tuples::tuple<BOOST_PP_ENUM_PARAMS(PSTADE_BOOST_TUPLE_MAX_SIZE, T)> >
   59     { };
   60 
   61     template< class Head, class Tail >
   62     struct minimum_traversal_category_in_iterator_tuple< tuples::cons<Head, Tail> > :
   63         pstade::oven::detail::minimum_traversal_category_in_iterator_tuple< tuples::cons<Head, Tail> >
   64     { };
   65 
   66 
   67 } } // namespace boost::detail
   68 
   69 
   70 #endif