Issue 19362 - std.getopt.config: change type to disallow or support bitwise operands
Summary: std.getopt.config: change type to disallow or support bitwise operands
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-03 18:37 UTC by Neia Neutuladh
Modified: 2024-12-01 16:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Neia Neutuladh 2018-11-03 18:37:33 UTC
Test case:
---
unittest
{
  import std.getopt;
  auto args = ["exe", "-h"];
  int intFlag = 5;
  auto result = getopt(args, config.caseSensitive | config.bundling, "H", &intFlag);
  assert(intFlag == 5);
  assert(result.helpWanted);
}
---

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.
Comment 1 dlangBugzillaToGithub 2024-12-01 16:34:27 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10357

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB