Error: static if conditional cannot be at global scope

Sean Kelly sean at f4.ca
Wed Apr 12 12:32:05 PDT 2006


kris wrote:
> This is an unfixed DDOC bug:
> 
> 
> /**
> 
> */
> struct AtoiT(T)
> {
>         static if (!is (T == char) && !is (T == wchar))
>                    pragma (msg, "Template type must be char or wchar");
> }
> 
> 
> dmd -D
> 
> "Error: static if conditional cannot be at global scope"

Reported a while back:

http://d.puremagic.com/bugzilla/show_bug.cgi?id=23

I'm currently using a -version=DDoc flag during documentation generation 
to produce a hacked version that DDoc will accept.  Not at all ideal, 
but it works :-p


Sean



More information about the Digitalmars-d-bugs mailing list