Open pkbehera opened 8 months ago
It would be a great feature, indeed.
Unfortunately, C++ templates do not work with default arguments, and cli library is implemented with template functions.
However, if someone in the community has already implemented a successful solution for using default arguments with template functions, please feel free to share a pull request (PR).
I tried registering the above handler, expecting the command to use default argument of 1, when no arguments are provided. But it did not work, though it compiled just fine:
Default arguments if available would be great!
Also, the error message here should better be something like
missing command arguments
instead ofwrong command
!