Pranav Srinivas Kumar
16e2a1da72
Added support for binary notation, e.g., 0b101
2023-11-05 19:06:50 -06:00
Pranav Srinivas Kumar
f84fa8484a
Marked copy and move constructors as deleted
2023-11-05 18:13:17 -06:00
Alexey Ismagilov
33146122a2
NEW: suppress flag for subcommand
...
resolve #258
2023-11-05 15:23:15 +03:00
Pranav Srinivas Kumar
de4239483d
Added logic and unit tests for the required flag in mutex_args
2023-11-04 15:36:01 -05:00
Pranav Srinivas Kumar
7bbde0defb
Added unit test for 2 mutex_groups
2023-11-04 15:24:07 -05:00
Pranav Srinivas Kumar
8f70dde82e
Added unit test for mutex_args with three arguments
2023-11-04 15:20:47 -05:00
Pranav Srinivas Kumar
eea95c0e3a
Added mutex args to copy constructor, changed to ordered set for data structure
2023-11-04 15:19:10 -05:00
Pranav Srinivas Kumar
39988ec62d
Initial commit for implementing MutuallyExclusiveGroup
2023-11-04 14:57:01 -05:00
Pranav Srinivas Kumar
281f1ab017
Closes #113 , add custom std::ostream& argument to ArgumentParser constructor
2023-11-04 09:31:13 -05:00
Pranav Srinivas Kumar
7a3e0f1cb3
Added another unit test for optional argument error reporting
2023-11-04 09:17:59 -05:00
Pranav Srinivas Kumar
62052fefcb
Closes #285
2023-11-04 09:01:31 -05:00
Pranav Srinivas Kumar
7657a22001
Updated formatting of error message, showing all variations of argument name
2023-11-03 22:18:08 -05:00
Pranav Srinivas Kumar
78ba5e9828
Removed brackets and quotes in error message
2023-11-03 22:12:00 -05:00
Pranav Srinivas Kumar
4111905a74
Improved error reporting for #299
2023-11-03 22:05:46 -05:00
Pranav Srinivas Kumar
716ec60291
Added flag() shorthand function
2023-10-27 16:37:20 -05:00
Pranav Srinivas Kumar
5e7ce61ca7
Closes #278
2023-10-27 12:59:04 -05:00
Pranav Srinivas Kumar
d28188f4d5
Closes #247
2023-10-27 12:34:57 -05:00
Pranav Srinivas Kumar
bf9642c51d
Upgraded doctest to v2.4.11
2023-10-27 11:41:35 -05:00
Pranav Srinivas Kumar
0b8d0e2426
Added support for integer type in choices
2023-10-27 10:28:54 -05:00
Pranav Srinivas Kumar
9bb553b882
#277 Added in-built support for string_type choices
2023-10-27 09:16:25 -05:00
Christoph Hindermann
6c4bddb990
CMakefile: Use -Wpedantic, -Werror and -Wextra for compilation in gcc. Fixed warnings
2023-10-20 19:57:12 +02:00
Pranav
57b63b09fa
Merge pull request #290 from Arthapz/master
...
Add C++20 module
2023-10-20 08:06:14 -05:00
Kian-Meng Ang
aa25a2f3ac
Fix typos
...
Found via `codespell -L seh`
2023-10-19 13:09:11 +08:00
Arthur LAURENT
6723c81877
update test to use module when WITH_MODULE macro is set
2023-10-15 18:51:56 +02:00
Pranav
b0930ab028
Merge pull request #268 from fanurs/align_multiline_message
...
Fix issue #248 : Align multiline help messages
2023-07-11 08:15:12 -05:00
Fanurs
e82653c2d9
Fixed test for multiline help message alignment
2023-04-22 19:23:17 -04:00
Fanurs
19d85eadb0
Passed test for multiline help message alignment
2023-04-22 15:16:47 -04:00
Sean Robinson
0ae3c7d919
Add exit_on_default_arguments parameter to ArgumentParser
...
Allows users to opt-out of std::exit call in default arguments without
needing to replace with new --help and --version arguments.
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2023-03-22 09:07:45 -07:00
Pranav
e516556733
Merge pull request #254 from skrobinson/fix-maintenance
...
Various maintenance tasks
2023-02-19 10:29:59 -06:00
Sean Robinson
7ed952f4fe
Add test for ArgumentParser::get() with inappropriate type
...
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2023-01-17 13:57:59 -07:00
Sean Robinson
cb3da173f6
Fix crash with char[] default values
...
Closes #249
Reported-by: @pfeatherstone
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2023-01-05 13:02:40 -07:00
Sean Robinson
5f22faa973
Add ArgumentParser::at to retrieve arguments and subparsers
...
This allows updating attached object properties without holding external
references to the various Argument and ArgumentParser objects.
Closes #227
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2022-11-29 13:43:16 -07:00
Sergey Podobry
8e6a36dd0d
Add is_subcommand_used overload
...
It's useful for removing string literals duplication in a code.
2022-11-08 01:31:45 +02:00
Sean Robinson
f710bbdacf
Add operator bool for ArgumentParser
...
This allows checking whether user input was processed into the parser
or any attached subparsers.
Closes #212
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2022-10-10 15:26:42 -07:00
Sean Robinson
2a15178bb7
Include canonical argument name in nargs range validation error
...
The name of a positional argument is never used.
Closes #208
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2022-09-23 07:54:58 -07:00
Pranav Srinivas Kumar
05232b7487
Started adding samples
2022-09-21 18:09:25 -07:00
Pranav Srinivas Kumar
66730967aa
Added support for custom prefix characters #67
2022-09-21 09:48:48 -07:00
Pranav Srinivas Kumar
616062e2bf
Added -Wshadow and -Wconversion to CXX_FLAGS and fixed warnings
2022-09-21 07:43:46 -07:00
Pranav Srinivas Kumar
6dd2a3cf4b
Added example to README for option=value support
2022-09-21 07:23:02 -07:00
Pranav Srinivas Kumar
20095a697a
Added option=value support using #185
2022-09-21 06:54:34 -07:00
Pranav Srinivas Kumar
14287af007
Closes #94
2022-09-21 06:23:42 -07:00
Pranav Srinivas Kumar
6e23d5b22e
Closes #181
2022-09-21 05:47:47 -07:00
Pranav Srinivas Kumar
793fbcde16
Added is_subcommand_used helper function
2022-09-20 21:15:58 -07:00
Pranav Srinivas Kumar
6c7da857b6
Added table of contents to README and clang formatted code
2022-09-20 20:27:24 -07:00
Pranav Srinivas Kumar
2f2858a8a7
Draft implementation of subparsers #42
2022-09-20 19:54:29 -07:00
Yoshihiro Hokazono
7b5084c454
Fix a typo
2022-06-22 07:16:41 +09:00
Yoshihiro Hokazono
b869b5a209
NArgsPattern -> nargs_pattern (to snake case)
2022-06-22 07:07:59 +09:00
Yoshihiro Hokazono
08943f47ab
Merge branch 'master' into feature/variable-length-nargs
2022-06-21 08:36:33 +09:00
Yoshihiro Hokazono
12fcae66a7
Prefer pre-const to post-const
2022-06-21 06:48:13 +09:00
Yoshihiro Hokazono
6dfaa1c20c
Restore a "remaining" test case for compat
2022-06-21 06:44:29 +09:00