docopt.cpp
                                
                                 docopt.cpp copied to clipboard
                                
                                    docopt.cpp copied to clipboard
                            
                            
                            
                        Use template classe for extraction of values ?
The interface would be nicer if we could do
auto out = args["--output"].as<std::string>();
auto num = args["--num"].as<size_t>();
instead of
auto out = args["--output"].asString();
auto num = args["--num"].asLong();
I do not know if this is possible of not.
It would be possible. However given that there are only 4 options, I'm not sure there would be a strong benefit to it.
Mainly to silent compiler warning while doing
int num = args["--num"].asLong();
But I do agree this is not a big feature.