Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-09-11 11:39:05

David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>>This improvement has been first suggested by Daveed Vandevoorde.
> Are you sure? I didn't hear it from Daveed until after:
> which was mostly ignored so I figured nobody cared.

I would have cared, but in the context of bool_testable, other things
have to be taken into account, like the freedom for the user to add an
operator int(). If he does that, the conversion to bool would break if
it isn't a real operator bool.

I think that both idioms have their place, and in the case of shared_ptr
it seems that Peter's approach has some important aspects that my
approach used in bool_testable can't provide. Anyway, it's good to
discuss it and I think we are on a good way fixing the overhead for
shared_ptr et al with the member variable pointer instead of the member
function pointer. I'd vote for changing it, even if the performance
overhead seems small. Smart pointers are just too important to leave out
an optimization...

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