https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96604
Bug ID: 96604
Summary: rejects-valid on befriending specialization of
conversion function template
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: richard-gccbugzilla at metafoo dot co.uk
Target Milestone: ---
Testcase:
struct A { template<typename T> operator T(); };
struct X {};
struct B { friend A::operator X(); };
Per [temp.mem]/5 and /6, I think this is supposed to perform template argument
deduction against the conversion function template and befriend operator T with
T = B.
Clang, EDG, and MSVC accept.