The intent of ": 1" is to use individual bits to store the bool state of
these class values. Because true != 0, this worked. But it was likely to
bite someone sometime. (My bad: 0fe17e22f6.)
This commit also adds m_accepts_optional_like_value to the bit field and
sets the default false value in the constructor.
Because we cannot set a default value during declaration (until C++20).
make sure future coders know to set the preferred default in the
constructor.
Closes#213
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
This replaces the verbiage copied from the Python argparse documentation
and makes the code sample more concrete. This illustrates how to avoid the
multiple help output problem reported in #165.
Closes#165
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
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>
The previous regex would also analyze doctest.hpp. We don't need to check
a vendored library.
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
Added ARGPARSE_INSTALL
This allows a separate project using argparse through CMake FetchContent_Declare(...) to install the project without having to also install argparse.
Resolves the following error during stage one of clang-tidy-pr-comments:
"error: 'argparse/argparse.hpp' file not found [clang-diagnostic-error]"
Closes#219
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
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>
FetchContent_MakeAvailable was added in CMake v3.14. Also includes
end-of-line whitespace clean-ups.
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
Resolves the following build error:
CMake Error at CMakeLists.txt:26 (ADD_EXECUTABLE):
Target "ARGPARSE_SAMPLE_custom_assignment_characters" links to target
"argparse::argparse" but the target was not found. Perhaps a
find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
std::less<Key> is the standard's default comparison function, we do not
need to re-declare the same function.
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
This action runs clang-tidy with results saved to a file which is then
parsed in stage two to post code comments. This multistage process lets
us post PR comments on code from forks.
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>