There is an issue with array_allocator, which clearly surfaced while working on libstdc++/19495. In a nutshell, the templated copy-constructor doesn't seem to play well with rebinds: after a rebind, the first copy-constructor call leads to _M_array = 0 and no memory can be possibly returned by allocate. This makes sense, because the underlying array probably is inappropriate for a type != the orginal one (because of alignment requirements, at least), but leads to an allocator much less usable in general applications.
-- Summary: array_allocator vs rebind & copy-constructor Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pcarlini at suse dot de CC: bkoz at redhat dot com,gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21609