64,281
社区成员
发帖
与我相关
我的任务
分享
void * operator new(size_t, void *location)
{
return location;
}
class Widget
{
public:
Widget(int widgetSize);
...
};
Widget * constructWidgetInBuffer(void *buffer,int widgetSize)
{
return new (buffer) Widget(widgetSize);
}