Add ArgumentParser::mIsParsed to copied members

MSVC 19.16 appears to be doing a copy rather than a move in
test_const_correct.  The copy ctor does not handle mIsParsed, so the
initial false value is kept.  This commit adds copying mIsParsed during
copy construction.

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
This commit is contained in:
Sean Robinson 2021-10-27 07:24:45 -07:00
parent af6bbc1d47
commit 500bc9277e

View File

@ -830,6 +830,7 @@ public:
ArgumentParser(const ArgumentParser &other)
: mProgramName(other.mProgramName),
mIsParsed(other.mIsParsed),
mPositionalArguments(other.mPositionalArguments),
mOptionalArguments(other.mOptionalArguments) {
for (auto it = std::begin(mPositionalArguments); it != std::end(mPositionalArguments);