From 9771baae369a72e196e0fbbdadbce3b1dc30ac37 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Sun, 5 Jul 2015 17:18:32 +0200 Subject: Fix conflicting overload of operator[] --- src/value.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/value.cpp b/src/value.cpp index c1a7a91e2b..bf75b8931b 100644 --- a/src/value.cpp +++ b/src/value.cpp @@ -351,6 +351,11 @@ value& value::operator[](const std::string& key) return dynamic_cast(*tag_)[key]; } +value& value::operator[](const char* key) +{ + return (*this)[std::string(key)]; +} + std::unique_ptr& value::get_ptr() { return tag_; -- cgit 0.0.5-2-1-g0f52