Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1332

Answer by HolyBlackCat for Why does C++ choose the base class overload when using a derived class member function pointer?

$
0
0

Simply because Derived doesn't declare its own foo, but rather inherits it from Base. If you override (or shadow) it, the type will change to ... (Derived::*)(...).

This is sometimes useful in templates to detect if a certain function was overridden or not.


Viewing all articles
Browse latest Browse all 1332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>