LICENSE, copyright, and formatting
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# copyright Carl Pearson, 2022
|
||||
|
||||
macro(add_args tgt)
|
||||
target_compile_options(
|
||||
${tgt}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
// copyright Carl Pearson, 2022
|
||||
|
||||
#include "argparse/argparse.hpp"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
@@ -11,12 +13,10 @@ int main(int argc, char **argv) {
|
||||
std::string maybePrint;
|
||||
int repeats = 2;
|
||||
|
||||
// Inform the parser of the program data. It will do type-specific conversion
|
||||
// from string.
|
||||
// Inform the parser of the program data. It will do type-specific conversionfrom string.
|
||||
|
||||
// An option invoked with `--repeat N`
|
||||
p.add_option(repeats, "--repeat")
|
||||
->help("how many times to repeat first argument");
|
||||
p.add_option(repeats, "--repeat")->help("how many times to repeat first argument");
|
||||
// A flag invoked with `--verbose` or `-v`
|
||||
p.add_flag(verbose, "--verbose", "-v");
|
||||
// a required positional argument (position 1)
|
||||
|
Reference in New Issue
Block a user