Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2001-03-19 03:11:13


In message <014701c0ae3f$111782a0$630524d4_at_pdimov>, Peter Dimov
<pdimov_at_[hidden]> writes
>I think that you are. The consensus among the experts, AFAIK, is
>
>* Don't provide implicit conversions;
>* If you do, don't use bool, use void const * instead.
>
>Implicit conversions to bool allow expressions like a + b, a + 4, a < b, a
><< b compile. Conversions to void const * allow comparisons only.

Agreed, there is a consensus: const void * is often a better Boolean
than bool, which is too permissive.

Kevlin
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  Curbralan Limited mobile: +44 7801 073 508
  mailto:kevlin_at_[hidden] fax: +44 870 052 2289
  http://www.curbralan.com
____________________________________________________________


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