Boost logo

Boost Users :

From: Ben Hutchings (ben.hutchings_at_[hidden])
Date: 2003-04-24 04:16:55


heath_r_davis <1heathdavis_at_[hidden]> wrote:
> I have experienced some difficulty with sorting lists of type:
>
> list < shared_ptr < foo > >
<snip>

You need to specify your own ordering predicate, because
shared_ptr<T>::operator< does *not* call T::operator< .

Also remember that if operator< is a member function it should be const.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net