This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/16055] New: basic_stringbuf incorrectly handles (and ultimately ignores) allocator arguments
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jun 2004 11:27:57 -0000
- Subject: [Bug libstdc++/16055] New: basic_stringbuf incorrectly handles (and ultimately ignores) allocator arguments
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
<sstream>, line 125
basic_stringbuf(const __string_type& __str,
ios_base::openmode __mode = ios_base::in | ios_base::out)
and:
<sstream>, line 112
basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
The constructor for std::basic_stringbuf does not have an allocator argumen.,
The constructor should take an optional allocator, defaulting to the result
of the allocator template argument type's default constructor; this is universal
in the standard library for complex types that have dynamically-allocated
components.
<bits/sstream.tcc>, line 103:
__string_type __tmp;
The underlying string is always created using the default allocator for
type string, namely std:allocator, instead of the allocator type of the
basic_stringbuf. The constructor to use should actually be an argument
to the constructor for the basic_stringbuf itself, and that in turn should come
from an argument to basic_stringstream.`
--
Summary: basic_stringbuf incorrectly handles (and ultimately
ignores) allocator arguments
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16055