![]() (it doesn't happen with the major ABIs, but it is theoretically possible). To use it, what makes you think the compiler could resolve the pointer from Aīack to B without storing a pointer somewhere? Since B is not standard layout,Ī subclass C of B could change the offsets from m_a1 and m_a2 to the top of B That adds size overhead and requires boilerplate.Īnd remember that offsetof is restricted for a reason. So to be portable code, A1 and A2 would each need to have a "B > cannot be done in general (only when B is a standard-layout class by using ![]() > virtualFunctions() will need to get B* from a pointer to A1*/A2*. > The issue with this approach is that the implementations of On sábado, 4 de novembro de 2017 04:07:46 PDT wrote: Software Architect - Intel Open Source Technology Center Thiago Macieira - thiago (AT) - thiago (AT) kde.org Given that that is so, what's the benefit? Only the syntax? With a new constructor that properly initialises the vtable, a new vtable, > (which lowers it to reading a function pointer from the vtable and callingįor all intents and purposes, it's a new class that derived from the original, However, the "default" code generation for virtual function calls > class, and correction to deal with the case that it is in a containing > overrider of a virtual function is somewhere is in the same or a derived > - Identification of any code in the compiler which assumes that final ![]() > class is set to the vtable of the derived class. ![]() Just like how the vtable pointer of a base > - Initialization of the vtable pointer within the base class when the base > overriding virtual functions of a member class. > - Generation of an appropriate vtable for each case of containing class > My understaning of compiler implementation is that these changes are needed: On quinta-feira, 2 de novembro de 2017 16:17:41 PDT wrote: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |