UB when deleting storage-providing char array from free store?

后端 未结 0 1292
渐次进展
渐次进展 2021-02-14 17:30

The following example of usage of placement-new was provided by an earlier version of the cppreference page:

char* ptr = new char[sizeof(T)]; // allocate memory
T         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题