The following code is rejected by GCC while it is accepted by Clang. struct Foo { template <typename> void meth(); }; struct Bar : private Foo { using Foo::meth; }; int main() { (void) &Bar::meth<int>; } GCC accepts a variant where Foo::meth is a plain (i.e., non-template) member function.
G++ accepts the using declaration but it seems to have no effect when forming a pointer to member for a specialization: in.cc: In function ‘int main()’: in.cc:3:11: error: ‘void Foo::meth() [with <template-parameter-1-1> = int]’ is inaccessible void meth(); ^ in.cc:12:16: error: within this context (void) &Bar::meth<int>; ^
This is similar issue to PR 56152 (static call vs non-static).
*** Bug 104488 has been marked as a duplicate of this bug. ***