c++ - What is vtable anchoring, and how does it work in a shared object? -


i performing research issues c++ library , ensuring type information consistent between application , shared object. i'm interested in ensuring equalobject comparison works, meaning indeed have same object, , not 2 objects happen equal under operator==.

this answer state anchor vtable in header. i'm not familiar technique. or i've heard called name.

what vtable anchoring, , how work?


i'm aware of dynamic_cast, throw, typeid don't work shared libraries gcc faq.

it's non-standard technology, problem clear: translation unit should contain vtable? if virtual destructor isn't inlined, defined in 1 translation unit, , it's easy choice put vtable there.

for portable code, pretty irrelevant. wouldn't care duplicate vtables.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -