It was used to populate the vtable slot of a virtual function that was defined as remote:
struct B { virtual void f() = delete; }; struct D : B { virtual void f() = delete; };
(The reason the remote virtual function is included in the vtable is because it allows you to subsequently change it to unidentified without breaking the vtable layout .)
I don't know how this could be called in (relatively normal) C ++, since the only thing that can override a function with a remote definition is another function with a remote definition ( [class.virtual] / 16 ), and any an attempt to call a function with a remote definition makes the program poorly formed. I suppose you can invoke the ghost of ODR violations:
// TU 1 struct B { virtual void f() = delete; virtual void g(); }; void B::g() { } // causes vtable to be emitted in this TU // TU 2 struct B { virtual void f(); virtual void g(); }; void h(B* b) { b->f(); } int main() { B b; h(&b); }
source share