Title
Library exceptions that take string arguments
Status
nad
Section
[std.exceptions][syserr.syserr][ios.failure]
Submitter
Eelis van der Weegen

Created on 2011-08-16.00:00:00 last changed 147 months ago

Messages

Date: 2012-02-27.16:24:02

[ 2012, Kona ]

Move to NAD.

This was discussed during C++11 standardization, and deemed (at the time) to be a conforming extension that vendors are free to add, but there seemed no need to call it out in the standard. Since then it has been noted that the rvalue-reference overloads do not give you the move-semantic guarantee the proposer is thought to be looking for, as in order to meet the requirements that copy constructors do not throw (for standard exceptions) the exceptions that store strings must actually store a reference-counted immutable string, rather than an std::string internally. Therefore, an rvalue-reference overload is going to have to allocate memory in exactly the same way as copying from a const string& argument.

Date: 2011-08-16.00:00:00

This is an extension issue for LWG to add constructor overloads that take a string by an rvalue reference in order to move the string into the exception.

History
Date User Action Args
2012-02-27 16:24:02adminsetmessages: + msg6018
2012-02-12 18:36:43adminsetstatus: new -> nad
2011-08-16 00:00:00admincreate