3 ms·
"The C/C++ standards require that two pointers to the same inline function are equal, even across translation unit boundaries." Sigh. I presume this is because
by DannyBee 10y ago
"The C/C++ standards require that two pointers to the same inline function are equal, even across translation unit boundaries."
Sigh. I presume this is because you can pass inline functions to callbacks, and the 6 people in the world who do
if (a == &f::foo)
{do something}
want it to work no matter what?
One solution, of course, is to privatize the function you call, but still hand any code paths that escape pointers and take the address the "other" version (which is i presume what you meant)