CoderNoteBook icon indicating copy to clipboard operation
CoderNoteBook copied to clipboard

placement new

Open Zeno-X opened this issue 2 years ago • 0 comments

1、placement new: int tmp = 1; int* ptr = new (&tmp)int(2);

2、 struct test_t{ void* operator new(size_t) return nullptr; };

test_t* test = new test_t;

Zeno-X avatar Aug 22 '22 00:08 Zeno-X