std::shared_ptr preallocation memory

Viewed 491

I want to preallocate memory both for control block and value_type for shared_ptr in one heap request (like std::make_shared), but do not construct immediately any object in it. And when I actually need to construct object use placement new. Is it possible? Neither std::make_shared or std::allocate_shared seem to solve my problem.

1 Answers
Related