This is the mail archive of the gcc-help@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]

Re: Covariant return types and order of class definitions


Hi,

I have found an answer to my question. The C++ ISO standard says:

"If the return type of D::f differs from the return type of B::f, the class 
type in the return type of D::f shall be complete at the point of declaration 
of D::f or shall be the class type D."

So I have to put the whole of VolumePlayerEnvelope's definition first. I guess 
this renders a forward declaration with inheritance information somewhat 
useless. :)

Thanks anyway,

Ben


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