diff options
author | Taylor C. Richberger <Taywee@gmx.com> | 2017-12-12 19:58:24 -0700 |
---|---|---|
committer | Taylor C. Richberger <Taywee@gmx.com> | 2017-12-12 19:58:24 -0700 |
commit | c5a60982ba01d765251c8f0aff6cf2c1c3fa4be8 (patch) | |
tree | ae147a6bd42bb18f48ac2d1a7acdf6d09f01b165 | |
parent | Merge pull request #52 from maPaydar/patch-1 (diff) | |
download | args.hxx-c5a60982ba01d765251c8f0aff6cf2c1c3fa4be8.tar.xz |
replace explicit std::vector ParseCLI with template, reduce optimization
Optimization absolutely kills test build time. Dropping optimization
level cuts compile time in less than half, and it still doesn't take
long to run.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | args.hxx | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -7,7 +7,7 @@ FLAGS += -std=c++11 ifdef DEBUG FLAGS += -ggdb -O0 else -FLAGS += -O2 +FLAGS += -O0 endif LIBS = @@ -2663,7 +2663,8 @@ namespace args return ParseArgs(args) == std::end(args); } - bool ParseCLI(const std::vector<std::string> &args) + template <typename T> + bool ParseCLI(const T &args) { return ParseArgs(args) == std::end(args); } |