Boost logo

Boost :

From: arun (aruns_at_[hidden])
Date: 2000-12-28 03:29:49


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