Boost logo

Boost :

From: Anthony Williams (anthony.williamsNOSPAM_at_[hidden])
Date: 2002-10-17 08:29:20


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"?
 
> There are "de facto" requirement tables that are never mentioned in the
> standard, but they do exist, and are more important than the real tables.

I can see that they are "more important" for the sake of portability, but
surely the point of having a Standard is that you can write code that relies
on the precise wording of the standard (in this case having Input Iterators
that return something convertible to bool) and expect it to work. Any
additional restrictions are just a potential source of bugs in user code and
support requests to vendors.

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.

Anthony

-- 
Anthony Williams
Senior Software Engineer, Beran Instruments Ltd.
Remove NOSPAM when replying, for timely response.

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