how to find the type of a supplied variable
Dicebot
public at dicebot.lv
Fri Dec 6 13:06:16 PST 2013
On Friday, 6 December 2013 at 20:58:15 UTC, seany wrote:
> why do i need the static? (is that not supposed to prevent
> insertations of new scopes inside the braces? is it really
> needed?)
You can possibly use normal if but most likely you will get
compilation errors from other conditional branches as they will
use parameter type in semantically incorrect way. `static if`
avoids compilation of not matching blocks and does not have this
issue. You can explicitly define new scope using one extra pair
of braces if you want it.
More information about the Digitalmars-d-learn
mailing list