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)); } /**