Boost logo

Boost :

From: Alexander Belopolsky (belopols_at_[hidden])
Date: 2001-07-10 19:31:21


--- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
> Better, but still not what I had in mind. I think the metaprogram
ought to
> go in indirect_iterator_generator so it can be used to select the
right
> value type even when the generator is used.

OK, here is another try. I don't have MSVC, so my changes
apply to #ifndef BOOST_MSVC only.

> cvs diff iterator_adaptors.hpp| less
Index: iterator_adaptors.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/iterator_adaptors.hpp,v
retrieving revision 1.42
diff -r1.42 iterator_adaptors.hpp
888c888
< struct value_type_of_value_type {

---
>   struct traits_of_value_type {
890c890,892
<       typedef typename
boost::detail::iterator_traits<outer_value>::value_type type;
---
>       typedef typename
boost::detail::iterator_traits<outer_value>::value_type value_type;
>       typedef typename
boost::detail::iterator_traits<outer_value>::reference reference;
>       typedef typename
boost::detail::iterator_traits<outer_value>::pointer pointer;
892a895,897
> 
> 
> 
898c903,909
<                 = BOOST_ARG_DEPENDENT_TYPENAME
detail::value_type_of_value_type<OuterIterator>::type
---
>                 = BOOST_ARG_DEPENDENT_TYPENAME
detail::traits_of_value_type<OuterIterator>::value_type
> #endif
>           , class Reference
> #if defined(BOOST_MSVC)
>                 = Value&
> #else
>                 = BOOST_ARG_DEPENDENT_TYPENAME
detail::traits_of_value_type<OuterIterator>::reference
900d910
<           , class Reference = Value&
902c912,917
<           , class Pointer = Value*
---
>           , class Pointer
> #if defined(BOOST_MSVC)
>                 = Value*
> #else
>                 = BOOST_ARG_DEPENDENT_TYPENAME
detail::traits_of_value_type<OuterIterator>::pointer
> #endif
913c928
<                 = BOOST_ARG_DEPENDENT_TYPENAME
detail::value_type_of_value_type<OuterIterator>::type
---
>                 = BOOST_ARG_DEPENDENT_TYPENAME
detail::traits_of_value_type<OuterIterator>::value_type

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk