Matlab clib diamond problem
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Although C++ is able to resolve the diamond problem using virtual classes, I have noticed that MATLAB cannot take advantage of this when writing a clib interface. I have attached a MWE presenting the problem. Putting it simply the header is like this:
class A {
public:
A();
virtual void Hello();
};
class B1 : virtual public A {
public:
B1();
};
class B2 : virtual public A {
public:
B2();
};
class C : virtual public B1, virtual public B2 {
public:
C();
};
In this example there is no ambiguity of what `C.Hello()` is, however when creating this object in Matlab, this fails because of `Access to base class is ambiguous.`. If we overide the definition, this problem is resolved, however this is not ideal for more complicated structure.
Will there be proper support for resolving this problem?
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Animation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!