You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (details::circular_less_than<index_t>(newTailIndex, stopIndex)) {
2159
2159
stopIndex = newTailIndex;
2160
2160
}
2161
-
MOODYCAMEL_CONSTEXPR_IF (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new ((T*)nullptr) T(details::deref_noexcept(itemFirst)))) {
2161
+
MOODYCAMEL_CONSTEXPR_IF (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast<T*>(nullptr)) T(details::deref_noexcept(itemFirst)))) {
2162
2162
while (currentTailIndex != stopIndex) {
2163
2163
new ((*this->tailBlock)[currentTailIndex++]) T(*itemFirst++);
2164
2164
}
@@ -2173,7 +2173,7 @@ class ConcurrentQueue
2173
2173
// may only define a (noexcept) move constructor, and so calls to the
2174
2174
// cctor will not compile, even if they are in an if branch that will never
2175
2175
// be executed
2176
-
new ((*this->tailBlock)[currentTailIndex]) T(details::nomove_if<(bool)!MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new ((T*)nullptr) T(details::deref_noexcept(itemFirst)))>::eval(*itemFirst));
2176
+
new ((*this->tailBlock)[currentTailIndex]) T(details::nomove_if<!MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast<T*>(nullptr)) T(details::deref_noexcept(itemFirst)))>::eval(*itemFirst));
2177
2177
++currentTailIndex;
2178
2178
++itemFirst;
2179
2179
}
@@ -2220,7 +2220,7 @@ class ConcurrentQueue
2220
2220
this->tailBlock = this->tailBlock->next;
2221
2221
}
2222
2222
2223
-
MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new ((T*)nullptr) T(details::deref_noexcept(itemFirst)))) {
2223
+
MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast<T*>(nullptr)) T(details::deref_noexcept(itemFirst)))) {
if (details::circular_less_than<index_t>(newTailIndex, stopIndex)) {
2698
2698
stopIndex = newTailIndex;
2699
2699
}
2700
-
MOODYCAMEL_CONSTEXPR_IF (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new ((T*)nullptr) T(details::deref_noexcept(itemFirst)))) {
2700
+
MOODYCAMEL_CONSTEXPR_IF (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast<T*>(nullptr)) T(details::deref_noexcept(itemFirst)))) {
2701
2701
while (currentTailIndex != stopIndex) {
2702
2702
new ((*this->tailBlock)[currentTailIndex++]) T(*itemFirst++);
2703
2703
}
2704
2704
}
2705
2705
else {
2706
2706
MOODYCAMEL_TRY {
2707
2707
while (currentTailIndex != stopIndex) {
2708
-
new ((*this->tailBlock)[currentTailIndex]) T(details::nomove_if<(bool)!MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new ((T*)nullptr) T(details::deref_noexcept(itemFirst)))>::eval(*itemFirst));
2708
+
new ((*this->tailBlock)[currentTailIndex]) T(details::nomove_if<!MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast<T*>(nullptr)) T(details::deref_noexcept(itemFirst)))>::eval(*itemFirst));
0 commit comments