Apparently, the “deletion” of one of the things by default does not affect the actual deletion. Some terrible disgusting remainder from the once proud default copy designer remained lying around to come up and tell you a formidable voice: "I deeeaaaaaad!".
This is not a completely surprising fact for me, although I did not know about it specifically before I asked this question. I could not quote you in the corresponding section of the standard (and I am sure that in the corresponding section there is no mention of ghouls, although this should). And I'm also sure that there is a reason why this happens when you follow an incredibly complicated story about some terrible event that would work terribly if it weren’t.
And, unfortunately, for you, if there is something lying around this better match than converting to a base class, this is what will be used. For example, in this code:
will lead to this conclusion:
B::foo(const B &) called! B::foo(const A &) called!
This is exactly as you expected. The compiler does not view the situation as ambiguous. And if you made void foo(const B &) private or protected member, then the compiler will still match it in preference to another, and will tell you that you tried to access what had an access specifier that said you you can not.
Think that you need to “delete” something by simply declaring it as a special access specifier, which is even more limited than private.
source share