Extended Description
The following code should compile, but doesn't
#include <functional>
int f(const char*, ...) { return 0; }
std::reference_wrapper fr{f};
decltype(fr)::result_type i;
struct X {
int f(const char*, ...) { return 0; }
};
auto xf = &X::f;
std::reference_wrapper xfr{xf};
decltype(xfr)::result_type j;
int main() {}
Reported by Jonathan Wakeley