summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-02-05 23:47:23 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-02-05 23:47:23 +0000
commitc1d29d2c92c186747770c545636fe036a7ff1b81 (patch)
treed38916855c144d7cd107e350a3923d0cdbd92037
parentSkip lexical cast if naturally convertible (diff)
downloadlibdbpp-c1d29d2c92c186747770c545636fe036a7ff1b81.tar.bz2
libdbpp-c1d29d2c92c186747770c545636fe036a7ff1b81.tar.xz
libdbpp-c1d29d2c92c186747770c545636fe036a7ff1b81.zip
Template key arg for deriving comparator
-rw-r--r--libdbpp/command.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdbpp/command.h b/libdbpp/command.h
index ce003c9..c9092b0 100644
--- a/libdbpp/command.h
+++ b/libdbpp/command.h
@@ -38,8 +38,8 @@ namespace DB {
protected:
/// Helper function to extract values from a CommandOptionsMap
- template<typename X>
- static X get(const CommandOptionsMap & map, const std::string & key, const X & def)
+ template<typename X, typename Y>
+ static X get(const CommandOptionsMap & map, const Y & key, const X & def)
{
if (auto i = map.find(key); i != map.end()) {
if constexpr (std::is_convertible<CommandOptionsMap::mapped_type, X>::value) {