Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofTC1 status.

209. basic_string declarations inconsistent

Section: 27.4.3[basic.string]Status:TC1Submitter: Igor StauderOpened: 2000-02-11Last modified: 2016-01-28

Priority:Not Prioritized

View otheractive issues in [basic.string].

View all otherissues in [basic.string].

View all issues withTC1 status.

Discussion:

In Section 27.4.3[basic.string] the basic_string member functiondeclarations 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 valuenot by reference - should be charT or const charT& )
- swap: redundant use of template parameters in argumentbasic_string<charT,traits,Allocator>&

Proposed resolution:

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

void push_back(charT c); basic_string& assign(const basic_string& str);void swap(basic_string& str);

Rationale:

Although the standard is in general not consistent in declarationstyle, the basic_string declarations are consistent other than theabove. The LWG felt that this was sufficient reason to merit thechange.


[8]ページ先頭

©2009-2026 Movatter.jp