Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-05-14 09:05:46


Andrey Semashev wrote:
> Currently is_const_iterator will result to true only if the iterator
> reference type is const value or const reference. I'm not sure how it
> should behave for iterators with a non-const value reference types and
> vector< bool >::iterator specifically. I'm leaving this to users to
> define by specializing is_const_iterator on their iterator types.
> Maybe there should exist specialization on
> vector< bool >::const_iterator right out of the box?

I'm not sure, but this is an interesting question:
   Is it feasible to detect the writability of iterator using some language magic?
If not, is_const_iterator can be a practical workarond.

Well, I looked at the 'MyList' example.
'transform_iterator' could not be used?

Regards,

-- 
Shunsuke Sogame

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