PhilipLB wrote:But it's an easy check if this is assignable or not? Just look if Foo* is a parent class and that's it...
I don't get why the tenary operator has to check here something at all? In Java, this works just fine...
But lets say it found a class named Bar as a common base. But you are trying to assign to Foo.
Is it going to an implicit cast or look for another common base and give error is can't.
That would mean to look at the lefthand again, that just won't do c++ is stubborn. It doesn't walk back.
These stupid errors all come from C++ being a single pass compiler.
It needs to know every thing a single pass, it doesn't like walking back. Doesn't even looks back at the left-hand of the assignment.
Terrible trait of the c++ compiler we all need to live with.
Nimet - Advanced Ogre3D Mesh/dotScene Viewer
asPEEK - Remote Angelscript debugger with html interface
ogreHTML - HTML5 user interfaces in Ogre