RE: [Boost-Users] Sorting list < shared_ptr < foo > > using std::list::sort()
24 Apr
2003
24 Apr
'03
9:16 a.m.
heath_r_davis <1heathdavis@msn.com> 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.
7890
Age (days ago)
7890
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ben Hutchings