If Statement with Declaration
Johan Engelen via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 21 14:50:02 PDT 2017
On Friday, 21 July 2017 at 21:32:48 UTC, Andrei Alexandrescu
wrote:
>
> It's bizarre even lexically: "If the following ... oh wait let
> me insert some stuff ... as I was saying, if the following
> condition happens..."
(excuse me for muddying the waters)
We do have a construct like that already:
```
static if (is(E V == enum)) { // this inserts "V"
V v;
}
```
-Johan
More information about the Digitalmars-d
mailing list