This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16169] New: -Weffc++ item 15 improvements
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2004 02:21:54 -0000
- Subject: [Bug c++/16169] New: -Weffc++ item 15 improvements
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
It would be nice to have operator= return a function that returns a refernce to
*this.
Right now, this warns. See the differences between basic_string.h's
std::string::operator= between 3.3.x and 3.5.x.
basic_string&
operator=(const basic_string& __str) { return this->assign(__str); }
vs.
basic_string&
operator=(_CharT __c)
{
this->assign(1, __c);
return *this;
}
See
--
Summary: -Weffc++ item 15 improvements
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bkoz at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16169