Multiply Defined Inline Constructors

Ian Lance Taylor iant@google.com
Wed Jun 3 20:33:00 GMT 2009


"Conley, John H" <JohnH.Conley@xerox.com> writes:

> class A : public parentA {

> class A: public parentB {

This is a C++ ODR violation.  Your program is undefined.  There is no
reliable way to make this work.  I recommend putting one or both classes
in a namespace.

Ian



More information about the Gcc-help mailing list