Title
basic_string declarations inconsistent
Status
tc1
Section
[basic.string]
Submitter
Igor Stauder

Created on 2000-02-11.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

Although the standard is in general not consistent in declaration style, the basic_string declarations are consistent other than the above. The LWG felt that this was sufficient reason to merit the change.

Date: 2010-10-21.18:28:33

Proposed resolution:

In Section [basic.string] change the basic_string member function declarations push_back, assign, and swap to:

void push_back(charT c); 

basic_string& assign(const basic_string& str);
void swap(basic_string& str);
Date: 2000-02-11.00:00:00

In Section [basic.string] the basic_string member function declarations use a consistent style except for the following functions:

void push_back(const charT);
basic_string& assign(const basic_string&);
void swap(basic_string<charT,traits,Allocator>&);

- push_back, assign, swap: missing argument nameĀ 
- push_back: use of const with charT (i.e. POD type passed by value not by reference - should be charT or const charT& )
- swap: redundant use of template parameters in argument basic_string<charT,traits,Allocator>&

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1865
2010-10-21 18:28:33adminsetmessages: + msg1864
2000-02-11 00:00:00admincreate