Clara icon indicating copy to clipboard operation
Clara copied to clipboard

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

Open vogel opened this issue 7 years ago • 0 comments

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.

vogel avatar Dec 18 '18 13:12 vogel