Boost logo

Boost :

From: Ariel Badichi (abadichi_at_[hidden])
Date: 2005-09-21 19:37:00


David Abrahams wrote:
>>>it's easy to arrange that only a literal zero works there.
>>
>>How?
>
>
> Allow assignment only from a private member pointer type. It's
> similar to the operator safe_bool idiom.

I thought you might mean that. That allows more than a literal zero,
though (e.g., 5 * 5 - 25). By the way, that might work well for smart
pointers; why don't shared_ptr and friends use this idiom?

> No, the whole point of
>
> g = 0;
>
> was to get you out of having to find a name for this thing.

:)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk