[Bug libstdc++/16054] New: basic_string incorrectly handles allocator arguments
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Fri Jun 18 11:26:00 GMT 2004
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
More information about the Gcc-bugs
mailing list