Map with maintained insertion order

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Mar 23 18:53:11 PDT 2012


On 3/24/12, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> Correction, it's:
> template isValue(T)
> {
>     enum bool isValue = is(typeof( { Value v; T t; v = t; } ))
>     || is(typeof( { BaseElement!Value v; T t; v = t; } ))
>     || is(BaseElement!Value == T);
> }

Last check not needed, so:
> template isValue(T)
> {
>     enum bool isValue = is(typeof( { Value v; T t; v = t; } ))
>     || is(typeof( { BaseElement!Value v; T t; v = t; } ));
> }

Anyway I'll stop spamming.


More information about the Digitalmars-d-learn mailing list