S
Stefan Ram
I compiled and executed (via Ctrl-F5)
#include <iostream>
#include <ostream>
int main(){ bool const a( 5 ); ::std::cout <<( a == true )<< '\n'; }
in »Microsoft Visual Studio 2010 C++ Express, Version 10.0.30319.1 RTMRel«
(a recent version) with the default settings (the Debug configuration as
preconfigured).
It printed:
0
. But didn't ISO/IEC 14882:2011 say in 4.12 Boolean
conversion about non-zero values:
»any other value is converted to true.«
?
#include <iostream>
#include <ostream>
int main(){ bool const a( 5 ); ::std::cout <<( a == true )<< '\n'; }
in »Microsoft Visual Studio 2010 C++ Express, Version 10.0.30319.1 RTMRel«
(a recent version) with the default settings (the Debug configuration as
preconfigured).
It printed:
0
. But didn't ISO/IEC 14882:2011 say in 4.12 Boolean
conversion about non-zero values:
»any other value is converted to true.«
?