diff --git a/src/mrw/args.hxx b/src/mrw/args.hxx index f59dfdc..e701dc6 100644 --- a/src/mrw/args.hxx +++ b/src/mrw/args.hxx @@ -4,8 +4,8 @@ */ // 1 2 3 4 5 6 7 8 // 45678901234567890123456789012345678901234567890123456789012345678901234567890 -#ifndef __MRW__ -#define __MRW__ +#ifndef __MRW_ARGS__ +#define __MRW_ARGS__ #include #include @@ -26,6 +26,10 @@ @refs MRW__OLD_PRE11_COMPILER is set. */ +// Add version information for @c what and @c ident +const std::string MRW_IDENT("$Id: " PACKAGENAME "-" PACKAGEVERSION " $"); +const std::string MRW_WHAT("#(@)" PACKAGENAME "-" PACKAGEVERSION); + namespace mrw { /// Cool and easy evaluation of commandline arguments in C++11. /** Evaluating command line arguments is extremely easy with this library: @@ -44,6 +48,7 @@ namespace mrw { args::parse(argc, argv, "This is an example for argument processing.", { {"h", "help", "show this help", {args::help(), args::exit()}}, + {"v", "version", "show version", {args::version(), args::exit()}}, {"r", "repeat", "number of repetitions", {args::param(r, "number")}}, {"f", "flag", "check a flag", {args::param(flag)}}, @@ -332,6 +337,26 @@ namespace mrw { std::cout<