This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.
Section: 20.3.4 [string.conversions] Status: CD1 Submitter: Daniel Krügler Opened: 2008-01-13 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [string.conversions].
View all issues with CD1 status.
The new to_string and to_wstring functions described in 20.3.4 [string.conversions] have throws clauses (paragraphs 8 and 16) which say:
Since all overloads return either a std::string or a std::wstring by value this throws clause is impossible to realize in general, since the basic_string constructors can fail due to out-of-memory conditions. Either these throws clauses should be removed or should be more detailled like:
Throws: Nothing if the string construction throws nothing
Further there is an editorial issue in p. 14: All three to_wstring overloads return a string, which should be wstring instead (The header <string> synopsis of 20.3 [string.classes] is correct in this regard).
In 20.3.4 [string.conversions], remove the paragraphs 8 and 16.
string to_string(long long val); string to_string(unsigned long long val); string to_string(long double val);
string to_wstring(long long val); string to_wstring(unsigned long long val); string to_wstring(long double val);