I just dump all of the command-line arguments into a
std::vector<std::string>. Then I can riffle through the
vector looking for arguments that affect the operation of the
program, and set program variables and flags accordingly.
What do those other methods offer that my method doesn't?
You don't have to riffle through the vector

.
In the case of CommandLine/Option in Gabi lib:
-- Not requiring the option list to be centralized. Adding a
new option is as simple as declaring a static variable, in
the translation unit that uses it. You don't have to find
the global list and modify it, nor pass a vector or anything
into the module somehow as an argument.
-- Options are typed, with implicit conversions where it makes
sense (mainly for BooleanOption and NumericOption); given a
static variable:
BooleanOption b( 'b' ) ;
you can write simply:
if ( b ) {
// Option b was set...
} else {
// it wasn't...
}
To tell the truth, I'm not sure if the implicit conversions
are such a good idea, although they seem to work out OK for
boolean options. But simply declaring a BooleanOption, or a
NumericOption, and having all of the rest happen
automatically (including the conversion and verification of
the argument in NumericOption---there's also a
BoundNumericOption which allows you to specify bounds, and
get an error if the argument isn't within bounds), seems
like an advantage to me.
-- Common error handling. If the option requires an argument,
it requests one from the system, and is assured of getting
one. If the user enters an unrecognized option, there is an
error---you don't have to write code for this in each
application.
-- Support for various option conventions. In addition to the
classical "-x abc" (which becomes "/x abc" under
Windows---the system dependencies are handled by the
library), you can use long names, a la GNU, or the GNU
convention for arguments: "-xyz=abc". You can also choose
to treat some options in order, so that they only affect
files that follow them.
Finally, CommandLine appears as a standard STL sequence, with
the options and their arguments stripped out, to the user. So
you can use it directly as an argument for things like
MultipleFileInputStream (an istream which takes a list of
filenames in the constructor, and reads them one after the
other, reading from standard in if the list is empty, and only
returning EOF when all of the files have been read).