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: 23.4.4.4 [string.io] Status: CD1 Submitter: Alisdair Meredith Opened: 2008-04-10 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [string.io].
View all issues with CD1 status.
Discussion:
In the current working paper, the <string> header synopsis at the end of 23.4 [string.classes] lists a single operator<< overload for basic_string.
template<class charT, class traits, class Allocator> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&& os, const basic_string<charT,traits,Allocator>& str);
The definition in 23.4.4.4 [string.io] lists two:
template<class charT, class traits, class Allocator> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const basic_string<charT,traits,Allocator>& str); template<class charT, class traits, class Allocator> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&& os, const basic_string<charT,traits,Allocator>& str);
I believe the synopsis in 23.4 [string.classes] is correct, and the first of the two signatures in 23.4.4.4 [string.io] should be deleted.
Proposed resolution:
Delete the first of the two signatures in 23.4.4.4 [string.io]:
template<class charT, class traits, class Allocator> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const basic_string<charT,traits,Allocator>& str);template<class charT, class traits, class Allocator> basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>&& os, const basic_string<charT,traits,Allocator>& str);