Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-04-24 11:01:40

Heath Davis wrote:
> Bravo!!! This is a truly novel approach! I agree that the
> shared_ptr::operator< is meaningless. If boost wishes to claim STL
> compatibility, container functions should be allowed to operate directly
> on the base level objects, rendering smart pointers completely
> transparent.

I disagree strongly. A smart pointer is an as-transparent-as-possible
replacement for a pointer, not a replacement for the object! What you
are thinking about is a smart reference or something like that. Smart
pointers behave like pointers and this is what your problem was. As Dave
showed, a simple

my_list.sort( *_1 < *_2 );

is all you need to provide the correct sorting - that's not asked for
too much, is it? :)

You are trying to address different problems by a single class and this
is IMHO a bad idea. A vote to keep the smart pointer semantics as they are.

Regards, Daniel

Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web:

Boost list run by bdawes at, gregod at, cpdaniel at, john at