2 ms·
That weird new(T* )T(...) syntax is how you ask c++ to run the constructor of T on an existing T* . (In this case that T* would point to the stack.) Note that
by 124816 16y ago
That weird new(T* )T(...) syntax is how you ask c++ to run the constructor of T on an existing T* .
(In this case that T* would point to the stack.)
Note that the memory at the T* shouldn't be a real T; or if it is, its destructor ought to be run first.