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
something
> > 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);

or

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

f(x);

> If the real intent did not make it into the precise wording of the
standard,
> 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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk