1 matches bool, 2 matches long

kenji hara k.hara.pg at gmail.com
Sat Apr 27 13:26:08 PDT 2013


2013/4/28 Walter Bright <newshound2 at digitalmars.com>

> On 4/27/2013 8:11 AM, kenji hara wrote:
>
>> Walter, now I changed my opinion. It seems not correct that being
>> regarded bool
>> type as one of the integer.
>> How about?
>>
>
> Both C and C++ regard bool as an integer, and implicitly convert 1/0 to
> true/false.
>
> What C++ doesn't have is VRP and partial ordering of functions. (But it
> does have partial ordering of template functions.)
>

I'm not argue that we should remove the implicit conversion from 1/0 to
bool.

I don't have so much knowledge about C/C++ language spec, but for the issue
case C++ makes "ambiguous error".
Contrary of that, D's current behavior looks to me it is going back to past.

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130428/0b5a84fc/attachment.html>


More information about the Digitalmars-d mailing list