求 E 问翻译 关于 new,该如何解决
求 E 问翻译 关于 new
The second function is called by a placement new expression to allocate _Count bytes of storage suitably aligned to represent any object of that size. The program can define an alternate function with this function signature that replaces the default version defined by the Standard C++ Library and so is replaceable.
The third function is called by a placement new expression, of the form new (args) T. Here, args consists of a single object pointer. This can be useful for constructing an object at a known address. The function returns _Ptr.
------解决方案--------------------
第二个函数通过placement new表达式分配_Count字节的存储空间,这个存储空间将以恰当的方式排列来代表任意一个具有这个大小的对象。程序可以用这个函数符号来定义一个替换函数以替换标准C++库定义的默认版本,因此它是可替换的。
第三个函数调用一个new (args) T形式的placement表达式。在这里,args是一个对象指针。当在一个已知的地址构造一个对象时,这会派上用场。函数返回_Ptr。
------解决方案--------------------
参考资料:
http://dev.csdn.net/Develop/article/28/68505.shtm
------解决方案--------------------
二楼的正解~!
------解决方案--------------------
蹭
The second function is called by a placement new expression to allocate _Count bytes of storage suitably aligned to represent any object of that size. The program can define an alternate function with this function signature that replaces the default version defined by the Standard C++ Library and so is replaceable.
The third function is called by a placement new expression, of the form new (args) T. Here, args consists of a single object pointer. This can be useful for constructing an object at a known address. The function returns _Ptr.
------解决方案--------------------
第二个函数通过placement new表达式分配_Count字节的存储空间,这个存储空间将以恰当的方式排列来代表任意一个具有这个大小的对象。程序可以用这个函数符号来定义一个替换函数以替换标准C++库定义的默认版本,因此它是可替换的。
第三个函数调用一个new (args) T形式的placement表达式。在这里,args是一个对象指针。当在一个已知的地址构造一个对象时,这会派上用场。函数返回_Ptr。
------解决方案--------------------
参考资料:
http://dev.csdn.net/Develop/article/28/68505.shtm
------解决方案--------------------
二楼的正解~!
------解决方案--------------------
蹭