Re: constructor for 'E' must explicitly initialize the base class 'C' which does not have a default constructor
Re: constructor for 'E' must explicitly initialize the base class 'C' which does not have a default constructor
- Subject: Re: constructor for 'E' must explicitly initialize the base class 'C' which does not have a default constructor
- From: Rick Mann <email@hidden>
- Date: Fri, 18 Jan 2013 02:24:13 -0800
On Jan 18, 2013, at 2:18 , John McCall <email@hidden> wrote:
> This is off-topic for this list, but since I'm here anyway, I'll answer. In the future, though, please take this to a venue that's more specific to C++.
Well, I am developing a Cocoa app, using Objective-C++ and clang (via Xcode). I just sanitized my example. Some stuff I read online suggested it might be a clang bug. I considered the Xcode list, but figured since this was more in the language than the tool, I asked here. Perhaps by that reasoning, I should've at least posted there instead.
I could try to find a C++ list, or perhaps Stack Overflow, in the future, but it didn't seem that off-topic to me.
> I believe that most expert C++ programmers would say that virtual inheritance is something that you should use very carefully, if you really must use it at all. Using it pervasively as your standard method of inheritance is almost certainly a sign of a poor class design.
I ended up getting rid of all the virtuals anyway; turns out (so far), my hierarchy doesn't end up duplicating subobjects.
Thanks for the answer.
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden