Perhaps you might be able to implement this in a CRTP manner, just like you could implement many constexpr functions like recursive ternary operation. However, I've been seeing many of the wonderful cppcon videos and am seeing that just because one can dig with spoons, doesn't mean that we should when a shovel is a much better tool (https://youtu.be/4AfRAVcThyA). Though, as CRTP is a static "inheritance", you'd have to use tuples instead of other homogenous containers.I don't pretend to understand the inner workings of the compiler, but as a developer, I would think that anything is possible, it's just the level of difficulty and if the feature is deemed worth the trouble.A--On Fri, May 31, 2019, 22:33 Jake Arkinstall via Std-Proposals, <std-proposals@lists.isocpp.org> wrote:--Immediate thought: this doesn't make sense to me. Can you provide a more detailed description of your particular use case? If it is just the inheritance of the I/O child classes then CRTP is the canonical solution. At least that way the type of the child class is known by the compiler, whereas the entire point of virtual inheritance is to allow flexibility at runtime.As such, I don't think this is remotely possible apart from in the circumstances that only one type is possible (E.g. in a branch where the type is determined). If those circumstances are commonplace, virtual inheritance is likely avoidable.
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
http://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
http://lists.isocpp.org/mailman/listinfo.cgi/std-proposals