Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2003-03-22 15:11:23


In article <20f001c2f09e$9e6da500$8d6c6f50_at_pc>, Terje Slettebø
<tslettebo_at_[hidden]> writes
>
>Regarding the other MSVC 6 warning given in the original report, Gennaro
>Prota has suggested using an explicit "!=", rather than relying on the
>implicit conversion from pointer to bool. This also avoids using a cast,
>instead.

Or one could use "stream << input && true" ;-) However, I think if one
is going to twist the expression of the code to satisfy the misplaced
oversensitivity of VC, it may be better to be more explicit than subtle,
ie "!(stream << input).fail()".

Kevlin
____________________________________________________________

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


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