6 ms·
Can't you just cast though? Like this: https://gcc.godbolt.org/z/Mq74Bo https://gcc.godbolt.org/z/Mq74Bo I get that it's a bit of an inconvenient workaround, b
by mehrdadn 6y ago
Can't you just cast though? Like this: https://gcc.godbolt.org/z/Mq74Bo https://gcc.godbolt.org/z/Mq74Bo
I get that it's a bit of an inconvenient workaround, but it doesn't seem impossible to handle? (At least as far as I've thought it through. I might be missing something though.)
- w0utert 6y agoI would have to go back to the code to see what the difference is with your example, but I think the problem was with overload resolution, where the base interface/implementation classes have a function by the same name as the derived interface/implementation classes but with a different signature. The compiler error was already at the declaration site, and not at the point the classes where instantiated. Maybe I'm not even fully grasping the problem myself, but in any case virtual inheritance on the interface classes resolved it ;-S