The problem with the value that is returned from the condition in `static if`. Bug or feature?

lobo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jun 6 20:01:14 PDT 2015


On Saturday, 6 June 2015 at 17:06:37 UTC, Dennis Ritchie wrote:
> [snip]

`static if(5 in hash) {}` will not work because (5 in hash) 
returns a pointer to the value or null if the key oesn't exist.

bye,
lobo






More information about the Digitalmars-d-learn mailing list