Editor << letters;

Editor << letters;

By Oliver Schoenborn

Overload, 9(42):, April 2001

I have discovered a couple of limitations with the TypeID article I submitted to Overload a while back. Basically, TypeID::fn :

  • Can't handle constructor/destructor methods (probably because their address can't be taken)

  • Won't work on overloaded methods in same scope (there's no way of specifying which of the overloads to use). This is particularly nasty since overloads often appear in derived classes along with a "using ..." declaration to prevent hiding the superclass's method being overloaded, in which case the overloads are all in scope and TypeID::fn can no longer cope.

Neither is unlikely to be circumventable with the current capabilities of C++'s RTTI, which shows just how useful a __FUNCTION__ macro would really be.

Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED

By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED

Settings can be changed at any time from the Cookie Policy page.