version vs. static if
Sean Kelly
sean at invisibleduck.org
Fri Sep 23 16:18:04 PDT 2011
On Sep 23, 2011, at 3:30 PM, Nick Sabalausky wrote:
>
> But version is *not* restricted to what's defined. It *also* deals with
> what's *not* defined. That's the main problem I'm talking about.
>
> If Walter wants to limit the logic operations and import implications, none
> of that necessitates that the version identifiers be based on "defined vs
> undefined".
>
> What I mean is this: Using an undefined version identifier should be an
> error:
>
> version(ThisIsNeverDeclaredAnywhere) {} else {}
>
> That is currently accepted, but it should be a compile-time error.
I'm not sure I understand. If this were the case, how could we use version(Windows) etc in our code?
More information about the Digitalmars-d
mailing list