$ cat required-from-here-bug.C template<class T> void f(typename T::type); int main() { f<int>(0); } $ g++ required-from-here-bug.C required-from-here-bug.C: In function ‘int main()’: required-from-here-bug.C:4:9: error: no matching function for call to ‘f<int>(int)’ 4 | f<int>(0); | ~~~~~~^~~ required-from-here-bug.C:1:24: note: candidate: ‘template<class T> void f(typename T::type)’ 1 | template<class T> void f(typename T::type); | ^ required-from-here-bug.C:1:24: note: template argument deduction/substitution failed: required-from-here-bug.C: In substitution of ‘template<class T> void f(typename T::type) [with T = int]’: required-from-here-bug.C:4:9: required from here required-from-here-bug.C:1:24: note: 4 | f<int>(0); required-from-here-bug.C:1:24: note: | ~~~~~~^~~ required-from-here-bug.C:1:24: error: ‘int’ is not a class, struct, or union type 1 | template<class T> void f(typename T::type); | ^ The two notes following the "required from here" diagnostic seem to be misprinted -- they refer to line 1, but show source code from line 4, which seems like a bug?
On second thought I reckon I'll just note this observation in the patch email thread instead, sorry for the noise...