diff options
author | Pavel Belikov <pavel.fuchs.belikov@gmail.com> | 2018-05-04 20:19:33 +0300 |
---|---|---|
committer | Pavel Belikov <pavel.fuchs.belikov@gmail.com> | 2018-05-04 20:19:33 +0300 |
commit | 17cfe1afd74dbfa5e4ba1401eeca9c80f6011b95 (patch) | |
tree | 81fa421d5792a99c9f821b610e9e5b64a2da01c9 /test | |
parent | Add test for windows minmax (diff) | |
download | args.hxx-17cfe1afd74dbfa5e4ba1401eeca9c80f6011b95.tar.xz |
Fix Nargs::min, Nargs::max initializers for min/max macros from <windows.h>
Diffstat (limited to 'test')
-rw-r--r-- | test/windows_h.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/windows_h.cxx b/test/windows_h.cxx index a9befe1..007a1e7 100644 --- a/test/windows_h.cxx +++ b/test/windows_h.cxx @@ -1,8 +1,14 @@ +#ifdef _WIN32 #include "windows.h" +#else +#define min(a,b) ((a)<(b)?(a):(b)) +#define max(a,b) ((a)>(b)?(a):(b)) +#endif + #include <iostream> #include <args.hxx> -int main() +int main(int argc, char** argv) { args::ArgumentParser parser("This is a test program.", "This goes after the options."); args::HelpFlag help(parser, "help", "Display this help menu", {'h', "help"}); |