
Tobias Schwinger wrote:
... we currently can't really make code like this work reliably, because:
- if the member function is cv-qualified the program is ill-formed by the current Standard - if you put U and T back together (e.g. for passing the argument on) the type might be incompatible with the type of the argument (this scenario occurs if cv qualification is silently dropped or when MSVC's thiscall silently becomes cdecl - it happens with the default configuration of this compiler) - some compilers (GCC, maybe others) will find the function template's signature doesn't match a pointer to member function (same problem with template partial specialization)
Yep, I sort of figured this would open up a whole can of worms :-)
To conclude, how should this best be handled?
Brute force, I guess ;-). IOW the proposed FunctionTypes lib or something similar.
Got it :-) John.