https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66698
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |6.1.0, 6.4.0 Target Milestone|--- |7.0 Known to work| |7.1.0, 8.1.0 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- More self contained testcase (rather than the code snipit in comment #0): #include <stddef.h> #include <iostream> template <typename C> class S { public: void add (C c) { ++cnt; } size_t size () const { return cnt; } private: size_t cnt {}; }; struct Foo1 {}; struct Foo2 {}; struct Foo3 {}; class Z : public S<Foo1>, public S<Foo2>, public S<Foo3> { public: using S<Foo1>::add; using S<Foo2>::add; using S<Foo3>::add; using S<Foo1>::size; // (1) using S<Foo2>::size; // (2) using S<Foo3>::size; // (3) }; int main(void) { Z z; z.add (Foo1 {}); z.add (Foo1 {}); z.add (Foo2 {}); std::cout << z.size () << std::endl; }