是否存在提升make_shared_array和make_scope或仅make_shared

Are there boost make_shared_array and make_scope or only make_shared?

本文关键字:make shared scope 或仅 array 是否 存在      更新时间:2023-10-16

有增压make_shared_arraymake_scope_ptr还是只有make_shared

boost::make_scoped_ptr不起作用,因为您不能从scoped_ptr转移所有权。至少,没有对swap的显式调用。

对于Boost 1.53,没有太多理由使用shared_array,因为您可以将shared_ptr与数组类型一起使用。所以只需使用boost::make_shared