Various minor changes to aid compiling with std14 (#182)
These changes make the code compile in clang10 with -std14.
This commit is contained in:
committed by
GitHub
parent
c899ee7ab2
commit
a9cfc3a2b4
@@ -121,6 +121,7 @@ namespace snmalloc
|
||||
}
|
||||
|
||||
Cmp(const Cmp&) = delete;
|
||||
Cmp(Cmp&&) noexcept = default;
|
||||
};
|
||||
|
||||
// This method is used in Verona
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace snmalloc
|
||||
class Singleton
|
||||
{
|
||||
inline static std::atomic_flag flag;
|
||||
inline static std::atomic<bool> initialised = false;
|
||||
inline static std::atomic<bool> initialised{false};
|
||||
inline static Object obj;
|
||||
|
||||
public:
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace snmalloc
|
||||
std::is_same<decltype(T::next), std::atomic<T*>>::value,
|
||||
"T->next must be a std::atomic<T*>");
|
||||
|
||||
std::atomic<T*> back = nullptr;
|
||||
std::atomic<T*> back{nullptr};
|
||||
T* front = nullptr;
|
||||
|
||||
public:
|
||||
@@ -72,10 +72,10 @@ namespace snmalloc
|
||||
SNMALLOC_ASSERT(front);
|
||||
std::atomic_thread_fence(std::memory_order_acquire);
|
||||
invariant();
|
||||
return std::pair(first, true);
|
||||
return {first, true};
|
||||
}
|
||||
|
||||
return std::pair(nullptr, false);
|
||||
return {nullptr, false};
|
||||
}
|
||||
};
|
||||
} // namespace snmalloc
|
||||
|
||||
Reference in New Issue
Block a user