Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ブーストはありmake_shared_arrayますmake_scope_ptrかmake_shared?
make_shared_array
make_scope_ptr
make_shared
boost::make_scoped_ptrから所有権を譲渡できないため、機能しませんscoped_ptr。少なくとも、への明示的な呼び出しがないわけではありませんswap。
boost::make_scoped_ptr
scoped_ptr
swap
また、Boost 1.53では、配列型でshared_array使用できるため、を使用する理由はあまりありません。shared_ptrしたがって、を使用してboost::make_sharedください。
shared_array
shared_ptr
boost::make_shared