www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19362] New: std.getopt.config: change type to disallow or


          Issue ID: 19362
           Summary: std.getopt.config: change type to disallow or support
                    bitwise operands
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dhasenan gmail.com

Test case:
  import std.getopt;
  auto args = ["exe", "-h"];
  int intFlag = 5;
  auto result = getopt(args, config.caseSensitive | config.bundling, "H",
  assert(intFlag == 5);

It's normal with logically composable enums to be able to or them together.
This doesn't work for std.getopt. If it compiles, it should do the right thing.

Nov 03 2018