// PR c++/94799 // { dg-do compile { target c++11 } } template struct A { typedef int type; operator int(); }; template using B = A; template typename B::type foo(B b) { auto r1 = b.operator typename A::type(); auto r2 = b.operator typename A::template A::type(); auto r3 = b.operator typename B::type(); auto r4 = b.operator typename B::template A::type(); return r1 + r2 + r3 + r4; } void bar() { foo(A()); }