This patch updates allocate_shared to call allocator_traits::construct. Fixes issue 41900. Based on D62233.
Note: __shared_ptr_aligned_block is very similar to __shared_ptr_array_block from D62641 (but with support for custom pointers).
Currently, I have not transferred the changes so the C++03 overloads. Once this has been reviewed a bit, then I will update those.
Wait, so you have an array of sizeof(ControlBlock) elements of aligned storage with sizeof(ControlBlock)? That's sizeof(ControlBlock) * sizeof(ControlBlock) bytes of storage. Why do you need that?