Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #10574
| From | Edek <edek.pienkowski@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: "bool const a( 5 )" in "Microsoft Visual Studio C++ 2010" |
| Date | 2011-09-28 20:39 +0200 |
| Organization | ATMAN - ATM S.A. |
| Message-ID | <j5vpo3$ges$1@node2.news.atman.pl> (permalink) |
| References | <bool-20110928162551@ram.dialup.fu-berlin.de> <3b622$4e836745$506c0d9c$29532@news.chello.at> |
On 09/28/2011 08:28 PM, Paul Brettschneider wrote: > Stefan Ram wrote: > >> . But didn't ISO/IEC 14882:2011 say in 4.12 Boolean >> conversion about non-zero values: >> >> »any other value is converted to true.« >> >> ? > > Oh yes! This has bitten me numerous times. Erroneously declared a function > parameter as bool instead of int and got very strange results. :( I don't think that is the point; it is about the standard conversion to bool, which many programmers rely on and which is well specified in the standard. Edek
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: "bool const a( 5 )" in "Microsoft Visual Studio C++ 2010" Paul Brettschneider <paul.brettschneider@yahoo.fr> - 2011-09-28 20:28 +0200
Re: "bool const a( 5 )" in "Microsoft Visual Studio C++ 2010" Edek <edek.pienkowski@gmail.com> - 2011-09-28 20:39 +0200
Re: "bool const a( 5 )" in "Microsoft Visual Studio C++ 2010" Paul Brettschneider <paul.brettschneider@yahoo.fr> - 2011-10-08 11:28 +0200
Re: "bool const a( 5 )" in "Microsoft Visual Studio C++ 2010" Miles Bader <miles@gnu.org> - 2011-10-09 09:39 +0900
csiph-web