On 24.04.15 08:29, Sergey Vojtovich wrote:
Hi Sanja,
yes, it is not a requirement to use true/false in C++.
I'd be Ok about my_bool if not one glitch: it can evaluate to anything that
char can evaluate to. C99 bool behaves more as expected:
<quot>
_Bool (also accessible as the macro bool) - type, capable of holding one of the
two values: 1 and 0 (also accessible as the macros true and false). Note that
conversion to _Bool does not work the same as conversion to other integer types:
(bool)0.5 evaluates to 1, whereas (int)0.5 evaluates to 0.
</quot>
I'd vote for bool/true/false everywhere if I were sure about it's portability
and about sizeof(_Bool) stability.
I have nothing against true/false. When (if?) we will have our style
book I will vote for it, but now I use what I used to (IMHO it is good
explanation to the original question).
_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~maria-developers
More help : https://help.launchpad.net/ListHelp