1 matches bool, 2 matches long
Mehrdad
wfunction at hotmail.com
Sun Apr 28 14:51:15 PDT 2013
On Sunday, 28 April 2013 at 21:29:06 UTC, Timon Gehr wrote:
> On 04/28/2013 10:54 PM, Mehrdad wrote:
>> - std::vector<bool>
>
> The issues surrounding vector<bool> are entirely unrelated.
Huh? It's entirely related.
The fact that sizeof(bool) * 8 != sizeof(byte) is what causes
problems in vector<bool> (can't treat them like other types,
which we can address directly), and it's also one of the
asymmetries bool has with integers in D (and any other language).
Different situation, same cause: bool doesn't behave like an
integer.
>> Isn't that self-contradictory?
> He is saying bool is an integral type in D. (i.e. it can be
> promoted to
'int' in order to support integer arithmetic.)
I thought we just established that boolean logic isn't integer
logic?
More information about the Digitalmars-d
mailing list