3 ms·
> Even C++ lets you store the address of the member function and lets you invoke it with an instance later. Not for virtual member functions (not that I've bee
by Huperniketes 6y ago
> Even C++ lets you store the address of the member function and lets you invoke it with an instance later.
Not for virtual member functions (not that I've been able to find). C++ is geared towards generating optimal executables. Since the type of the object is known at compile-time, the particular function used for that type is known, and the compiler will generate code that applies for it.
This is why C++ uses mangled names: to discriminate between identically named functions of different types and signatures.