From 500bc9277e289c1e4b609e77923fa88a64f62406 Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Wed, 27 Oct 2021 07:24:45 -0700 Subject: [PATCH] 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 --- include/argparse/argparse.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index cb427cd..75437f8 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -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);