Re: Is it a bug in std.getopt.config.stopOnFirstNonOption?

2019-08-16 Thread Ali Çehreli via Digitalmars-d-learn
On 08/16/2019 02:07 PM, Andrey Zherikov wrote: But: - if I change line (1) to `auto args = ["app", "--foo", "foo", "--bar", "bar"];` then this code works. - if I remove line (2) then this code works. Yes, it's a bug. Another workaround--which I haven't tested to see whether produces the

Is it a bug in std.getopt.config.stopOnFirstNonOption?

2019-08-16 Thread Andrey Zherikov via Digitalmars-d-learn
Here is the code I have which doesn't work: ``` string[] foo; string[] bar; auto args = ["app", "--bar", "bar", "--foo", "foo"]; // (1) import std.getopt; getopt(args, std.getopt.config.stopOnFirstNonOption, // (2) "foo", , "bar", ); ``` The error I see: