This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/21609] New: array_allocator vs rebind & copy-constructor
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 May 2005 16:24:16 -0000
- Subject: [Bug libstdc++/21609] New: array_allocator vs rebind & copy-constructor
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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