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
assert(reinterpret_cast<ConcurrentQueue*>((BlockingConcurrentQueue*)1) == &((BlockingConcurrentQueue*)1)->inner && "BlockingConcurrentQueue must have ConcurrentQueue as its first member");
assert(reinterpret_cast<ConcurrentQueue*>((BlockingConcurrentQueue*)1) == &((BlockingConcurrentQueue*)1)->inner && "BlockingConcurrentQueue must have ConcurrentQueue as its first member");
71
71
if (!sema) {
@@ -551,18 +551,11 @@ class BlockingConcurrentQueue
551
551
552
552
553
553
private:
554
-
template<typename U>
555
-
staticinline U* create()
556
-
{
557
-
auto p = (Traits::malloc)(sizeof(U));
558
-
return p != nullptr ? new (p) U : nullptr;
559
-
}
560
-
561
-
template<typename U, typenameA1>
562
-
staticinline U* create(A1&& a1)
554
+
template<typename U, typenameA1, typenameA2>
555
+
staticinline U* create(A1&& a1, A2&& a2)
563
556
{
564
-
auto p = (Traits::malloc)(sizeof(U));
565
-
return p != nullptr ? new (p) U(std::forward<A1>(a1)) : nullptr;
557
+
void* p = (Traits::malloc)(sizeof(U));
558
+
return p != nullptr ? new (p) U(std::forward<A1>(a1), std::forward<A2>(a2)) : nullptr;
0 commit comments