Factored casts out of DLL/mpmcstack/mpscq.

Nicer use of decltype to constrain instances.

Made a terminator method, to factor out casts.
This commit is contained in:
Matthew Parkinson
2019-04-25 10:18:28 +01:00
committed by Matthew Parkinson
parent 4faf9f3bee
commit 2c613b4f8a
3 changed files with 25 additions and 17 deletions

View File

@@ -11,7 +11,7 @@ namespace snmalloc
private:
static_assert(
std::is_same<decltype(((T*)0)->next), std::atomic<T*>>::value,
std::is_same<decltype(T::next), std::atomic<T*>>::value,
"T->next must be a std::atomic<T*>");
ABA stack;