From 45982a536480efeadb70d3a67b8f9bf5b99ee849 Mon Sep 17 00:00:00 2001
From: Anton Korobeynikov This declaration defines a variable "OptimizationLevel" of the
"OptLevel" enum type. This variable can be assigned any of the values
that are listed in the declaration (Note that the declaration list must be
-terminated with the "clEnumValEnd" argument!). The CommandLine
+terminated with the "clEnumValEnd" argument!). The CommandLine
library enforces
that the user can only specify one of the options, and it ensure that only valid
enum values can be specified. The "clEnumVal" macros ensure that the
@@ -902,10 +902,10 @@ can use it like this:
-
-
So, generally, the problem is that you have two cl::list variables that interact in some way. To ensure the correct interaction, you can use the @@ -913,7 +913,7 @@ can use it like this:
absolute position (as found on the command line) of the optnum item in the cl::list.The idiom for usage is like this:
- +static cl::list<std::string> Files(cl::Positional, cl::OneOrMore); static cl::list<std::string> Libraries("l", cl::ZeroOrMore); @@ -948,7 +948,7 @@ can use it like this:Note that, for compatibility reasons, the cl::opt also supports an unsigned getPosition() option that will provide the absolute position - of that option. You can apply the same approach as above with a + of that option. You can apply the same approach as above with a cl::opt and a cl::list option as you can with two lists.
So far, these are the only two miscellaneous option modifiers.
+So far, these are the only three miscellaneous option modifiers.
@@ -1653,7 +1661,7 @@ help text to be printed out for the --help option. } -To use the extrahelp, simply construct one with a const char* +
To use the extrahelp, simply construct one with a const char* parameter to the constructor. The text passed to the constructor will be printed at the bottom of the help message, verbatim. Note that multiple cl::extrahelp can be used, but this practice is discouraged. If @@ -1822,7 +1830,7 @@ our example, we implement parse as:
const std::string &Arg, unsigned &Val) { const char *ArgStart = Arg.c_str(); char *End; - + // Parse integer part, leaving 'End' pointing to the first non-integer char Val = (unsigned)strtol(ArgStart, &End, 0);