]> granicus.if.org Git - icinga2/commitdiff
Build fix for ancient versions of GCC 6009/head
authorGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 18 Jan 2018 13:45:47 +0000 (14:45 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 18 Jan 2018 14:12:14 +0000 (15:12 +0100)
lib/base/dictionary.cpp
lib/base/object.hpp

index d4ac10b50100abc65403ebb7682116ff134f2c3f..8472cc68d6ade3f3bbf9b128daf3fc75c87b4d41 100644 (file)
@@ -32,13 +32,13 @@ REGISTER_PRIMITIVE_TYPE(Dictionary, Object, Dictionary::GetPrototype());
 Dictionary::Dictionary(const DictionaryData& other)
 {
        for (const auto& kv : other)
-               m_Data.emplace(kv);
+               m_Data.insert(kv);
 }
 
 Dictionary::Dictionary(DictionaryData&& other)
 {
        for (auto& kv : other)
-               m_Data.emplace(std::move(kv));
+               m_Data.insert(std::move(kv));
 }
 
 Dictionary::Dictionary(std::initializer_list<Dictionary::Pair> init)
index 2b5d0037901014e903d0b483418274690cf7042e..2dabb3038338b01ab754cd55cc588351fdccec68 100644 (file)
@@ -129,10 +129,10 @@ struct Lazy
        operator Lazy<U>() const
        {
                if (m_Cached)
-                       return Lazy<U>(m_Value);
+                       return Lazy<U>(static_cast<U>(m_Value));
                else {
                        Accessor accessor = m_Accessor;
-                       return Lazy<U>([accessor]() { return static_cast<U>(accessor()); });
+                       return Lazy<U>(static_cast<typename Lazy<U>::Accessor>([accessor]() { return static_cast<U>(accessor()); }));
                }
        }