http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57272
Bug ID: 57272 Summary: node-based containers don't use allocator's pointer type internally Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: redi at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Container nodes are linked together by built-in pointers, but they should use the allocator's pointer type instead. Currently I think only std::vector does this correctly. This is quite an invasive change and not worth implementing until C++11 allocators are supported, which is only true of forward_list and unordered containers so far. I have a patch in progress for forward_list. The change requires replacing every _Node* with a _Node_ptr typedef and then using indirection through std::pointer_traits to convert between e.g. _Node_ptr and _Node_base_ptr. I need to do some measurement to see if the indirection has a cost and if so then use partial specialization to avoid all the indirections when the pointer is a built-in type.