virtual-inheritance
Why can't static_cast be used to down-cast when virtual inheritance is involved?
Consider the following code: struct Base {}; struct Derived : public virtual Base {}; void f() { Base* b = new Derived;[详细]
2023-04-05 22:56 分类:问答single virtual inheritance
I understand that virtual inheritance of a base class creates a common shared base class among multiple derived classes, thus addressing the DDD problem. If I have only one derived class for my base c[详细]
2023-04-04 04:26 分类:问答How C++ virtual inheritance is implemented in compilers?
How the compilers implement the virtual i开发者_Python百科nheritance? In the following code: class A {[详细]
2023-04-03 14:27 分类:问答Virtual inheritance (diamond) - Why do I need to upcast to Base class from the most Derived class
consider the following : #include <iostream> #include <string> using namespace std; class A {[详细]
2023-04-01 00:35 分类:问答Dominance in virtual inheritance
What are the C++98/C++03 standards\' and the C++0x future standard\'s exact rules for dominance in virtual inheritance?[详细]
2023-03-31 06:44 分类:问答Multiple (diamond) inheritance compiles without "virtual", but doesn't with
Given the following code (without virtual inheritance) : class A { public: virtual void f() = 0; }; class B : public A[详细]
2023-03-31 01:54 分类:问答C++, ambiguous inheritance error in vs 2010
I have some troubles with the application of polymorphism in this example. This question is similar to my last question[详细]
2023-03-24 21:11 分类:问答C++ Inheritance via dominance warning
I\'m trying to implement a rather large object that implements many interfaces. Some of these interfaces are pure virtual. I may have a problem in diamond inheritance. Visual Studio is reporting a war[详细]
2023-03-23 20:33 分类:问答Does virtual inheritance and virtual function use the same vtable?
There is one little related question. But the topic is entirely different. Now, one co开发者_如何学JAVAncept is about the function resolution and another is about class resolution ? I am wondering th[详细]
2023-03-15 05:36 分类:问答What is the VTT for a class?
Recently ran across a C++ linker error that was new to me. libfoo.so: undefined reference to `VTT for Foo\'[详细]
2023-03-11 07:54 分类:问答