Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-10-17 08:39:51

From: "Anthony Williams" <anthony.williamsNOSPAM_at_[hidden]>
> Peter Dimov writes:
> > This means that the requirements are broken, not that there is
> > wrong with the code. The requirement should be "usable in boolean
> > expressions and other contexts where a bool is required" and not
> > "convertible to bool". I'm sure that this is the original intent.
> How does this differ from "must be bool"?

It doesn't because I wasn't precise. By "other contexts..." I meant if(x),
while(x), x? ...: ..., !x, and so on, and obviously not

bool & r(x);


struct V { V(bool); };
void f(V);


> If the real intent did not make it into the precise wording of the
> this is a bug in the standard (a DR) rather than an example of de-facto
> requirements that are more important than the specified requirements.

It's both. These aren't mutually exclusive.

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