Not understanding this.
Results in p have a <Bad Ptr> upon inspection.Code:std::allocator<string> alloc; auto const p = alloc.allocate(10);
This is fine. Why is that as well as for integral types like int? C++ Primer has a clear example using a std::string for the templated type of allocator .Code:std::allocator<string*> alloc; auto const p = alloc.allocate(10);