www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.getopt in 2.047


I've noticed that documentation does not reflect what std.getopt does 
concerning endOfOptions ("--").


Options Terminator

A lonesome double-dash terminates getopt gathering. It is used to 
separate program options from other parameters (e.g. options to be 
passed to another program). Invoking the example above with "--foo -- 
--bar" parses foo but leaves "--bar" in args. The double-dash itself is 
removed from the argument array.


But the double-dash is not removed. I've encountered this while testing 
a small program, but then looked at std.getopt.d, and indeed 
handleOption just breaks on endOfOptions without removing it. Is this a 
documentation error or Phobos bug?


Aug 10 2010