Menu

#2 Bug In sorting of options

open
nobody
None
5
2012-09-23
2012-09-23
No

With this snipit it took me a while to realize what was happening:

ez::ezOptionParser opt;
opt.add("", 0, 0, 0, "Display Usage Instructions.", "-h", "--help", "--usage", "/?");
std::string Usage;
opt.getUsage(Usage);
std::cout << Usage.c_str();

The /? has no alpha-numeric characters so the sorting alg used by getUsageDescriptions does not handle it and asserts when reading out of range.

Discussion