Merge pull request #708 from devnexen/new_placement_tests

c++ override test new placement operator
This commit is contained in:
Daan 2023-03-29 15:57:53 -07:00 committed by GitHub
commit 2141e414a7
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,6 +97,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 {