[Bug c++/56152] explicit template instantiation of protected template function redeclared as public fails

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Dec 11 08:53:08 GMT 2021


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2013-08-21 00:00:00         |2021-12-11
           Keywords|                            |rejects-valid

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
class C
{
protected:
  template<typename T>
  static T f(T x){return x;}
};

struct AC : C
{
  using C::f;
};

unsigned int (*func)(unsigned int) = AC::f;


More information about the Gcc-bugs mailing list