I agree with you, but a user can easily wrap their own to avoid the boilerplate for adding arguments. An example would be:
// Could provide more detailed usage if wanted.
constexpr char USAGE[] = "./program --input_path input --output_path output";
int main(int argc, char** argv) {
const flags::args args(argc, argv);
const auto input_path = args.get<std::string>("input_path");
const auto output_path = args.get<std::string>("output_path");
if (!input_path || !output_path) {
std::cerr << USAGE << std::endl;
return 1;
}
std::cout << "success: " << *input_path << " to " << *output_path
<< std::endl;
return 0;
}
The primary goal of this is to be simple to use and implement in your project, but I can see the use of a simple validation function which provides the same functionality as the above.