[Bug c++/87480] [8/9 Regression] SFINAE constructor not matched, only in templated function
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 1 14:12:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87480
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |8.3
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Slightly further reduced (it happens for any function template, not just
constructors):
template<typename T> T&& declval();
template <typename T, typename = decltype(declval<T>().d)> void f(T) { }
struct A {
double d;
};
#ifndef FIX
template <typename>
#endif
void j(A& a) {
f(a);
}
More information about the Gcc-bugs
mailing list