Hello,
while the question appears to be about a specific ABI, it is really
about the validity of code that would expose issues in it.
Starting from a member function type and applying the following trait,
one can get a function type:
template<class> struct RP;
template<class T,class F> struct RP<T F::*>{typedef T type;};
If the member function has a cv-qualifier (that applies to *this), it
gives a strange type like int(double)const. In name mangling terms,
this can be encoded by taking the type int(double) and making it
const, and since a function cannot be const it is unambiguous.
Now in C++11, we can also have ref-qualifiers on *this, so it seems
natural to proceed in the same way. Except that this time,
int(&)(double) is a valid type, completely unrelated to int(double)&.
Clang mangles them the same (and so will probably all other users of
the Itanium C++ ABI), which seems to me to be an issue, but it is
quite possible that the contorsions necessary to make the type
int(double)& appear are illegal, although DR 1417 seems to confirm
what I say.
Any opinion?
--
[ See
http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]