src: fix compilation with clang

This commit is contained in:
Markus F.X.J. Oberhumer
2024-05-07 12:33:55 +02:00
parent 3d82f0cfe1
commit 76b2cec8ee
2 changed files with 22 additions and 7 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ forceinline std::atomic<T> *ptr_std_atomic_cast(T *ptr) noexcept {
// TODO later: make sure that this cast is indeed legal
std::atomic<T> *result = ptr_static_cast<std::atomic<T> *>(ptr);
static_assert(sizeof(*result) == sizeof(*ptr));
static_assert(alignof(*result) == alignof(*ptr));
static_assert(alignof(decltype(*result)) == alignof(decltype(*ptr)));
return result;
}
#endif // WITH_THREADS