Boost logo

Boost :

From: Daniel Frey (d.frey_at_[hidden])
Date: 2003-02-25 15:41:55


On Tue, 25 Feb 2003 21:14:14 +0100, David Abrahams wrote:

> Daniel Frey <daniel.frey_at_[hidden]> writes:
>
>> David Abrahams wrote:
>>>
>>> Daniel Frey <daniel.frey_at_[hidden]> writes:
>>>
>>> > That won't work as you made it a nested struct so it is still
>>> > different for all instantiations. I think Dave meant to go for this
>>> > one:
>>>
>>> Yup, that's what I meant. BTW, so this safe_bool thing can get
>>> further re-used it might make sense to make a special friend class
>>> which just has access to the type... or at that point, just make the
>>> type publicly accessible.
>>
>> Can you elaborate a bit? I imagine that although the technical
>> implementation might be identical, the sematics of the names could be a
>> problem.
>
> Can you elaborate a bit? How could the semantics be a problem?

As Doug already showed it's a problem when you use the same safe_bool for
all your classes as a replacement for operator bool. I though that you
have some other uses in mind that are more than just a replacement for
operator bool. If so, I wondered what this could be and if the name would
then be a problem. If it's just meant to replace operator bool, the names
are perfect - although the problem Doug mentioned remains.

Regards, Daniel


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