basic_string
inserterSection: 27.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
27.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 27.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 27.4 [string.classes] is correct, and the first of the two signatures in 27.4.4.4 [string.io] should be deleted.
Proposed resolution:
Delete the first of the two signatures in 27.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);