diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-01-08 11:40:36 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-01-08 11:40:36 +0100 |
commit | 1d4954e73e389d319416bf29e949b4b1cbc9ebd9 (patch) | |
tree | 9cb054c6cf053445a14ba961b191e4eb241ea372 /src/libutil/args.hh | |
parent | 48a9be2aabf6620ceb00caf7c4c917e4e0a81446 (diff) |
Remove mkFlag integer specialisation
Diffstat (limited to 'src/libutil/args.hh')
-rw-r--r-- | src/libutil/args.hh | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/libutil/args.hh b/src/libutil/args.hh index 3e84ac64a..c54b0efaf 100644 --- a/src/libutil/args.hh +++ b/src/libutil/args.hh @@ -174,24 +174,6 @@ public: }); } - template<class I> - void mkFlag(char shortName, const std::string & longName, - const std::string & description, std::function<void(I)> fun) - { - addFlag({ - .longName = longName, - .shortName = shortName, - .description = description, - .labels = {"N"}, - .handler = {[=](std::string s) { - I n; - if (!string2Int(s, n)) - throw UsageError("flag '--%s' requires a integer argument", longName); - fun(n); - }} - }); - } - void expectArgs(ExpectedArg && arg) { expectedArgs.emplace_back(std::move(arg)); |