This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/16054] New: basic_string incorrectly handles 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:26:03 -0000
- Subject: [Bug libstdc++/16054] New: basic_string incorrectly handles allocator arguments
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
library bits/basic_string:
As in all other C++ standard types that use dynamic allocation,all constructor
forms of the the class std::basic_string should take an allocator argument with
a default value; the default being the default-constructor of the allocator
type of the template.
However, the constructor:
basic_string(const basic_string& __str);
has no allocator and:
basic_string(const basic_string& __str, size_type __pos,
size_type __n, const _Alloc& __a);
has no default.
Also, the constructors:
basic_string(const basic_string& __str, size_type __pos,
size_type __n = npos);
and
basic_string(const basic_string& __str, size_type __pos,
size_type __n, const _Alloc& __a);
can be merged to:
basic_string(const basic_string& __str, size_type __pos,
size_type __n = npos, const _Alloc& __a = _Alloc());
--
Summary: basic_string incorrectly handles 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=16054