List:MySQL++« Previous MessageNext Message »
From:Jonathan Wakely Date:November 20 2008 12:35am
Subject:Re: Here goes nothing.
View as plain text  
2008/11/19 Rick Gutleber:
> I know what you mean.  I got hit several months ago by an insidious bug
> where, I'd accidently gotten some arguments in the wrong order or something
> similar and rather than complain that it couldn't cast a bool to the type it
> was expecting, g++ figured int was close enough, and called the constructor
> with 1 or 0.  Frankly I cannot imagine why; bools are not numbers.   That's
> the whole reason the type exists.  I'm pretty sure the Microsoft compiler
> didn't do this sort of thing.

Then it's non-conforming. bool converts to int, just like int converts
to long. bools definitely are numbers, they are an arithmetic type
according to the standard.

Re: Here goes nothing.Warren Young17 Nov
  • Re: Here goes nothing.Rick Gutleber19 Nov
    • Re: Here goes nothing.Warren Young19 Nov
      • Re: Here goes nothing.Rick Gutleber19 Nov
        • Re: Here goes nothing.Jonathan Wakely20 Nov
      • Unexpected results with stock (was Re: Here goes nothing.)Rick Gutleber19 Nov
Re: Here goes nothing.Warren Young17 Nov