2 #ifndef BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED
3 #define BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED
5 // Copyright Aleksey Gurtovoy 2000-2004
7 // Distributed under the Boost Software License, Version 1.0.
8 // (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 // See http://www.boost.org/libs/mpl for documentation.
17 #include <boost/mpl/apply.hpp>
18 #include <boost/mpl/iterator_tags.hpp>
19 #include <boost/mpl/next.hpp>
20 #include <boost/mpl/deref.hpp>
21 #include <boost/mpl/aux_/lambda_spec.hpp>
22 #include <boost/mpl/aux_/config/ctps.hpp>
23 #include <boost/type_traits/is_same.hpp>
25 namespace boost { namespace mpl {
29 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
33 , typename LastIterator
38 typedef Iterator base;
39 typedef forward_iterator_tag category;
40 typedef transform_iter< typename mpl::next<base>::type,LastIterator,F > next;
42 typedef typename apply1<
44 , typename deref<base>::type
52 struct transform_iter< LastIterator,LastIterator,F >
54 typedef LastIterator base;
55 typedef forward_iterator_tag category;
62 , typename LastIterator
65 struct transform_iter;
68 struct transform_iter_impl
72 , typename LastIterator
77 typedef Iterator base;
78 typedef forward_iterator_tag category;
79 typedef transform_iter< typename mpl::next<Iterator>::type,LastIterator,F > next;
81 typedef typename apply1<
83 , typename deref<Iterator>::type
89 struct transform_iter_impl<true>
93 , typename LastIterator
98 typedef Iterator base;
99 typedef forward_iterator_tag category;
105 , typename LastIterator
108 struct transform_iter
109 : transform_iter_impl<
110 ::boost::is_same<Iterator,LastIterator>::value
111 >::template result_< Iterator,LastIterator,F >
115 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
119 BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::transform_iter)
123 #endif // BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED