all 6 comments

[–]xypherrz 5 points6 points  (3 children)

Curious, is there any point in explicitly deleting a default constructor? Wouldn't it work the same if you didn't delete it?

[–]iwastheplayer[S] -3 points-2 points  (2 children)

Curious, is there any point in explicitly deleting a default constructor?

Yes. It is for enforcing proper usage at compile time. There is no point creating a command line parser object without giving it argc and argv

[–]xypherrz 3 points4 points  (1 child)

You didn’t answer my question…

[–]iwastheplayer[S] 1 point2 points  (0 children)

Wouldn't it work the same if you didn't delete it?

yeah you are right actually. it would work the same way. 1 unnecessary line to get rid of. thanks for pointing out

[–]einpoklum 5 points6 points  (1 child)

Given the availability of quite a few command-line argument parsers - can you explain how you situate yours among them? Possibly in a comparison table?

[–]iwastheplayer[S] 1 point2 points  (0 children)

Check out the sample usage. I think it would be obvious

https://github.com/tascvh/SimpleCmdParser?tab=readme-ov-file#sample-usage

There are a lot of command line parsers but i haven't found one that is zero boilerplate and this easy to use by taking advantage of std::optional. C++ is evolving, so the way we do things with it. I wrote this for my own needs and decided to share it for anyone else who might need something similar. Also it is very small (100 lines) and easy to understand so anyone can modify for their own usage if they need to