This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/16560] New: error with inner class declaring operator=


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]