Title
rvalue ref issue with basic_string inserter
Status
cd1
Section
[string.io]
Submitter
Alisdair Meredith

Created on 2008-04-10.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Delete the first of the two signatures in [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);
Date: 2008-04-10.00:00:00

In the current working paper, the <string> header synopsis at the end of [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 [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 [string.classes] is correct, and the first of the two signatures in [string.io] should be deleted.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3933
2008-04-10 00:00:00admincreate