Closed vadz closed 7 years ago
I'm going to close this as the rework in Clara 1.0 makes this a moot point (the CommandLine
template no longer exists - each option and argument is a separate parser - non-templated - and you don't need to supply a config object type - you just bind individual variables or lambdas - which give you your final "nice have point" request :-) )
This is not really an issue, more of a question, but as there doesn't seem to be any better place to discuss it, let me start it here: why do we need to use
ConfigT
as template parameter everywhere? It is indeed good practice to collect all the command line options values in one struct, but looking at my existing projects (which I am thinking of migrating to Clara), I see that quite a few of them don't actually do it like this and just use local variables. And there doesn't seem to be any reason not support it in Clara too, i.e. it seems to me that the following should be possible:Granted, implementing #1 would make this less critical as I could then do
but it would still be nice to have direct support for this IMHO.