Open
Description
The following valid program is rejected by clang and gcc but accepted by msvc. Demo
#include <iostream>
struct C{
int f(this int);
};
decltype(C::f) func; //msvc accepts but clang and gcc rejects
int func(int j)
{
std::cout << "called with: " << j << std::endl;
return 5;
}
For future reference, the bug was discovered here.