Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Opt and Arg classes can be inherited from, but are sliced by default #78

Open
vogel opened this issue Dec 18, 2018 · 0 comments
Open

Opt and Arg classes can be inherited from, but are sliced by default #78

vogel opened this issue Dec 18, 2018 · 0 comments

Comments

@vogel
Copy link

vogel commented Dec 18, 2018

I had some special needs from one of my Arg parameter that I wanted to implement by inheriting from it and reimplementing parse method. It turned out to not work, as Arg and Opt instances are sliced in Parser class (see m_options and m_args members).

I think that either Arg and Opt could be make final, or m_options and m_args could use some kind of pointers instead of using values to allow for own implementations of those concepts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant