Topic: Defect Report: Style inconsistency in basic_string member function declarations.
Author: Stauder Igor <Igor.Stauder@swh.sk>
Date: 2000/02/12 Raw View
[Moderator's note: this defect report has been forwarded to
the C++ committee. -moderator(fjh).]
In Section 21.3 [lib.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>&
Resolution:
In Section 21.3 [lib.basic.string] the the basic_string member function
declarations push_back, assign, swap change to:
void push_back(charT c);
or
void push_back(const charT& c);
basic_string& assign(const basic_string& str);
void swap(basic_string& str);
Igor Stauder
Igor.Stauder@swh.sk
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]