This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16560] New: error with inner class declaring operator=
- From: "larsbj at lyx dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jul 2004 09:23:16 -0000
- Subject: [Bug c++/16560] New: error with inner class declaring operator=
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This snippet works with gcc 3.3 and 3.4, but fails on 3.5.
g++ (GCC) 3.5.0 20040715 (experimental)
class Foo {};
class Bar : public Foo {
public:
struct Item {
Item & operator=(Item const &);
};
};
g++ -c test.C -o test.o
test.C:3: error: declaration of `Bar& Bar::operator=(const Bar&)'
test.C:1: error: conflicts with previous declaration `Foo& Foo::operator=(const
Foo&)'
Please tell if you need the preprocessed sources.
--
Summary: error with inner class declaring operator=
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: larsbj at lyx dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16560