Boost logo

Boost :

From: Arun Sivaramakrishnan (aruns_at_[hidden])
Date: 2000-12-29 04:16:38


Jeremy wrote:
>
> If you want to use a function returning a reference, use projection
> iterator instead of transform.

Same problem.
Since we cannot have pointer to references or reference to references
there are compiler errors when AdaptableUnaryFunction
returns a reference type.
As Dave said, we do need specializations to overcome this problem
atleast for some compilers.

>
> Also, using IteratorTraits::pointer for the pointer type is not going to
> work. Suppose the transform function converts int's to std::string's.
> IteratorTraits::pointer is going to be int*, but doesn't it make more
> sense to have std::string* as the pointer type?

You are right.

Regards,
Arun


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