|
Boost : |
From: Thomas Witt (witt_at_[hidden])
Date: 2003-09-28 12:39:26
Hi Keith,
Just a short remark, more to follow.
Keith MacDonald wrote:
>
> class const_iterator
> : public boost_const_iterator
This does not work, it never did and it never will. First rule of
iterators: Don't derive from an iterator.
The reason is that the operator return types get messed up. BTW this is
the reason why ia uses the CRT pattern.
const_iterator x;
const_iterator y = ++x; // Uuups does not compile
++x returns a boost_const_iterator!
Thomas
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk