c++ override test new placement operator

This commit is contained in:
David Carlier 2023-03-18 11:11:49 +00:00
parent 824fd8a7b1
commit cbccbbe9a4

View File

@ -95,6 +95,10 @@ static void various_tests() {
delete t;
t = new (std::nothrow) Test(42);
delete t;
auto tbuf = new unsigned char[sizeof(Test)];
t = new (tbuf) Test(42);
t->~Test();
delete tbuf;
}
class Static {