Boost logo

Boost :

Subject: Re: [boost] safe-bool CRTP class
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2011-05-28 16:31:47

On Sat, May 28, 2011 at 3:23 PM, Jeffrey Lee Hellrung, Jr. <
jeffrey.hellrung_at_[hidden]> wrote:
> Here's a trial attempt at an implementation of the macro (warning: not
> tested):

I haven't looked at the implementation in depth, but if I recall correctly,
C++0x explicit conversions to bool are not quite the same as a safe-bool
conversion (explicit conversions still generally require explicit casts,
correct me if I'm wrong). Because of this, I do not believe it would be a
good idea for such a macro to automatically use explicit conversion
operators when available as it could result in user code that compiles in 03
but fails to compile in 0x.

-Matt Calabrese

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