You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mParentParsers member is currently unused. add_parents's semantics is only merging options. But consider the following: if there is only one parent parser, copy construct from an existing parser has the same effect. We only need a way to change the new instance's mProgramName.
Does ArgumentParser has value semantics? ArgumentParser is copy cunstructible, but a copy of ArgumentParser is not a distinct copy because shared_ptr are used without special handling. Parsing in the new parser will affect the old parser. But parent parser also has the "problem," unless this is by design.
If this is not by design, then we'd better to support value semantics in full in both copy-constructor and add_parents.
The text was updated successfully, but these errors were encountered:
lichray
added a commit
to lichray/argparse
that referenced
this issue
Nov 16, 2019
The
mParentParsers
member is currently unused.add_parents
's semantics is only merging options. But consider the following: if there is only one parent parser, copy construct from an existing parser has the same effect. We only need a way to change the new instance'smProgramName
.Does
ArgumentParser
has value semantics?ArgumentParser
is copy cunstructible, but a copy ofArgumentParser
is not a distinct copy becauseshared_ptr
are used without special handling. Parsing in the new parser will affect the old parser. But parent parser also has the "problem," unless this is by design.If this is not by design, then we'd better to support value semantics in full in both copy-constructor and
add_parents
.The text was updated successfully, but these errors were encountered: