I saw such code snippet in
…packagesMicrosoft.Windows.ImplementationLibrary.1.0.240122.1includewilresult.h
if (auto pNewRaw = details::ProcessHeapAlloc(0, sizeof(Node)))
{
auto pNew = new (pNewRaw) Node{threadId};
Can someone explain what does it means?
In my case I get compilation errors in string “auto pNew = new (pNewRaw) Node{threadId};”
and even can’t guess how to perform correct workaround..
Is this new C++ 20 standard?
1>….packagesMicrosoft.Windows.ImplementationLibrary.1.0.240122.1includewilresult.h(419,38): error C2061: syntax error: identifier ‘pNewRaw’
1>….packagesMicrosoft.Windows.ImplementationLibrary.1.0.240122.1includewilresult.h(419,51): error C2143: syntax error: missing ‘;’ before ‘{‘
1>….packagesMicrosoft.Windows.ImplementationLibrary.1.0.240122.1includewilresult.h(419,60): error C2143: syntax error: missing ‘;’ before ‘}’
1>….packagesMicrosoft.Windows.ImplementationLibrary.1.0.240122.1includewilresult.h(425,25): error C3536: ‘pNew’: cannot be used before it is initialized
1>….packagesMicrosoft.Windows.ImplementationLibrary.1.0.240122.1includewilresult.h(426,32): error C2664: ‘PVOID _InterlockedCompareExchangePointer(volatile PVOID *,PVOID,PVOID)’: cannot convert argument 2 from ‘int’ to ‘PVOID’