From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2003-10-11 01:54:21
I'm playing a little with some pointer containers and would like some
bool operator<( const Base& r, const Base& l );
v.push_back( new Derived );
std::sort( v.begin(), v.end() );
works by comparing derived Base objects while only copying the underlying
pointers of the container.
My attempt was to return another object from the iterators operator*() which
(a) compare objects instead of pointers
(b) copy pointers instead of objects
but it failed misserably.
Does anybody know if it is even possible to do it?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk