struct X { int v; typedef int t; void f(X); }; struct YA { int value; typedef int type; }; struct Z { void f(Z); }; template struct C : X, T { using T::value; using typename T::type; using X::v; using typename X::t; }; template struct D : X, T { using T::value; using typename T::type; using X::v; using typename X::t; }; template struct E : X, T { using T::value; using typename T::type; using X::v; using typename X::t; }; template struct F : X, T { using T::value; using typename T::type; using X::v; using typename X::t; }; // Force instantiation. typedef C::type I; typedef D::type I; typedef E::type I; typedef F::type I; #if __cplusplus >= 201702L template struct G : T... { using T::f...; }; using Q = decltype(G()); #endif