Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-06 14:03:03


From: "David Abrahams" <david.abrahams_at_[hidden]>
> From: "Peter Dimov" <pdimov_at_[hidden]>
>
> > What I'm trying to say is that make_projection_iterator should (assuming
a
> > conforming compiler):
> >
> > * handle the case where F::result_type == T const & by creating a const
> > projection iterator with value_type == T.
> >
> > * handle the case where F::result_type == T & by creating a non-const
> > projection iterator with value_type == T.
[...]
> > The problem, of course, is how to achieve this without partial
> > specialization.
>
> does any of this require "type unwinding?". I don't think it requires more
> than ref/const_ref detection.

We need to strip the reference (and the const) from result_type to get a
value_type for the iterator, unfortunately; and remove_reference doesn't
work on broken compilers.

The only solution I see is to pass the value_type to
make_projection_iterator explicitly.

--
Peter Dimov
Multi Media Ltd.

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