guard clause style static if

kdevel kdevel at vogtner.de
Sat Jul 7 11:28:00 UTC 2018


It appears not to be possible to use static if in "guard clause 
style" as in

    void bar (T ...) (T args)
    {
       static if (args.length == 0)
          return;

       writeln (args [0]);
       return bar (args [1 .. $]);
    }

Is this intended?


More information about the Digitalmars-d-learn mailing list