This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/53221] New: [C++11] basic_string lacks "copy/move constructors" with allocator
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 May 2012 20:13:09 +0000
- Subject: [Bug libstdc++/53221] New: [C++11] basic_string lacks "copy/move constructors" with allocator
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53221
Bug #: 53221
Summary: [C++11] basic_string lacks "copy/move constructors"
with allocator
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: daniel.kruegler@googlemail.com
The library implementation of gcc 4.8.0 20120429 (experimental) misses the
following "copy/move constructors" with allocators:
basic_string(const basic_string&, const Allocator&);
basic_string(basic_string&&, const Allocator&);
These were added to the working draft with acceptance of the allocator proposal
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2554.pdf
The following test case fails:
//---
#include <string>
#include <memory>
int main()
{
std::string s1;
std::string s2(s1, std::allocator<char>());
std::string s3(static_cast<std::string&&>(s1), std::allocator<char>());
}
//---