This has been bounced around for a couple years now
#474 and a few others have expressed desire to work with non-standard
option names. We have been somewhat resistant to that but I think it can
be done now. This PR adds a modifier `allow_non_standard_option_names()`
It is purposely long, it is purposely off by default. But what it does
is allow option names with a single `-` to act like a short option name.
With this modifier enabled no single letter short option names are
allowed to start with the same letter as a non-standard names. For
example `-s` and `-single` would not be allowed.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Update options.md book chapter and the readme to better reflect current usage and the modifications to the add_options templates.
add support in add_option for wrapper types, such as std::optional, boost::optional or other types with a value_type trait. Add support for generalized containers beyond vector, add support for nested tuples and vectors, and complex numbers directly in add_option. This includes several new type traits and object categories.
Upgrade the google test version to better support templated tests.
add support for vector argument separator `%%`
* update formatting to match recent changes
* Apply suggestions from code review
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Add whitespace/comments check
* Adapt spacing in clang-format
* Fix cpplint whitespace/comments issues
* Grammar
* Do not use clang-format for comment spacing
* Fix with clang-format pre-commit hook
* work on the flags book chapter and making sure the values are initialized properly.
* Fix initialization of values used in flags or options
* update some formatting and more brace initialization
* update more formatting and fix a incorrect initializer
* more formatting and some error fixes
* more formatting
* Small formatting fix
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* Adding first draft of Sets
Use IsMember now
Using IsMember as backend for Set
Non-const validator backend
Move set tests to set
Clearer inits
* Drop shortcut
Tighten up classes a bit for MSVC
Check with GCC 4.8 too
* Simpler templates, but more of them
Dropping more type safety for older compilers
Shortcut string set
* Adding shortcut init
Making g++ 4.7 docker image happy
Fix Clang tidy issue with last commit
Adding one more shortcut, adding a couple of tests
* Dropping dual pointer versions of code
* Smarter shortcut syntax
* Adding slighly faster choices
* Cleanup to make InMember simpler
* Drop choices for now, adding some tests
* ValidationError is now always the error from a validator
* Support for other types of initializer lists, including enums
* Factor out type utilities, single version of IsMember code
* Adding a few tests for #224
* Minor cleanup for Validation Error
* Adding tests, moved deprecated tests
* Docs updates