Matlab clib diamond problem
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Animation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!