Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-12-28 10:05:48


Arun,

The transform_iterator is Jeremy's class, so I'll have to leave definitive
answers to him, but:
It seems to me that you are right. At least for compilers which support
partial specialization we should be able to deduce an appropriate value_type
and pointer type.

-Dave

----- Original Message -----
From: "arun " <aruns_at_[hidden]>

> Can Jeremy/Dave or someone explain why
> transform_iterator_traits have the type pointer defined as
>
> typedef value_type* pointer;
>
> This seeems to be making assumptions (needless?) about
> value_type.
>
> For example ,use of transform_iterator with a function
> that returns a const T& would be inviting trouble.
>
> And why cant one use the other alternative viz
>
> typedef IteratorTraits::pointer pointer;
>
> This puts us more in control of type pointer and avoids
> the error that we get when using functions returning
> references in transform_iterator.This also requires
> that the value_type be compatible with the pointer.(can the compiler
> be left to decide that?)
>
> -arun
>
>
>
>
>


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