https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65157

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-12-13
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, the following should compile too but does not:
template <typename T>
class A {
 public:
  class C;
  template <typename U> static void d();
};

template <typename T>
class A<T>::C {
 C();
 friend void A<T>::d<char>();
};

template <typename T> template <typename U>
void A<T>::d() {
  C a{};
}

int main() {
  A<char>::d<char>();
}
---- CUT ---
the original testcase which had "C() = default;" is able to compile in GCC 9+
but the friend is not really recognized.

Reply via email to