From 450306a01c8fdbb46215a206401a57e49a61508a Mon Sep 17 00:00:00 2001 From: stoffu Date: Mon, 26 Feb 2018 17:08:02 +0900 Subject: command line: allow has_arg to handle arg_descriptor #3318 --- src/common/command_line.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/common') diff --git a/src/common/command_line.h b/src/common/command_line.h index f67efcf86..7c48d94e4 100644 --- a/src/common/command_line.h +++ b/src/common/command_line.h @@ -214,8 +214,8 @@ namespace command_line } } - template - bool has_arg(const boost::program_options::variables_map& vm, const arg_descriptor& arg) + template + typename std::enable_if::value, bool>::type has_arg(const boost::program_options::variables_map& vm, const arg_descriptor& arg) { auto value = vm[arg.name]; return !value.empty(); @@ -239,8 +239,8 @@ namespace command_line return vm[arg.name].template as(); } - template<> - inline bool has_arg(const boost::program_options::variables_map& vm, const arg_descriptor& arg) + template + inline bool has_arg(const boost::program_options::variables_map& vm, const arg_descriptor& arg) { return get_arg(vm, arg); } -- cgit v1.2.3