From b8cb91d95ffffe5b95f5f12cea4d00ae3fc20b37 Mon Sep 17 00:00:00 2001 From: Roland Eischer Date: Fri, 14 Apr 2017 13:52:45 +0200 Subject: [PATCH] Fixed ambiguous Value::setRaw usage --- include/value.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/value.h b/include/value.h index daab0d45..929ebb83 100644 --- a/include/value.h +++ b/include/value.h @@ -79,7 +79,7 @@ class PHPCPP_EXPORT Value : private HashParent int i = 0; // set all elements - for (auto &elem : input) setRaw(i++, elem); + for (const auto &elem : input) setRaw(i++, static_cast<(const Value&)>(elem)); } // old visual c++ environments have no support for initializer lists @@ -96,7 +96,7 @@ class PHPCPP_EXPORT Value : private HashParent int i = 0; // set all elements - for (auto &elem : value) setRaw(i++, elem); + for (const auto &elem : value) setRaw(i++, static_cast<(const Value&)>(elem)); } // end of visual c++ check @@ -110,7 +110,7 @@ class PHPCPP_EXPORT Value : private HashParent Value(const std::map &value) : Value(Type::Array) { // set all elements - for (auto &iter : value) setRaw(iter.first.c_str(), iter.first.size(), iter.second); + for (const auto &iter : value) setRaw(iter.first.c_str(), static_cast(iter.first.size()), static_cast<(const Value&)>(iter.second)); } /**