mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6009 from Icinga/fix/build-fix-gcc
Build fix for ancient versions of GCC
This commit is contained in:
commit
7702cb056a
|
@ -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)
|
||||
|
|
|
@ -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()); }));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue