Why isn't bool allowed as AA key type?

Nick Sabalausky a at a.a
Sun May 29 13:21:11 PDT 2011


"David Nadlinger" <see at klickverbot.at> wrote in message 
news:irrd5h$hdj$1 at digitalmars.com...
> Hello all,
>
> is there a reason bool isn't allowed as key type for associative arrays 
> (mtype.c:3995)? The docs don't mention this.
>
> bool-key AAs probably wouldn't be too useful in practice, but it seems 
> like a quite arbitrary and unexpected limitation to me - e.g. I would have 
> to add special cases to all my Thrift map handling code.
>
> In case this is not on purpose, I'd be happy to put together a pull 
> request.
>

It works for me. I use it all the time as a hash set. What version are you 
on? I've been using D2, maybe it's a D1 issue? If so, I'd file a bug report.




More information about the Digitalmars-d mailing list