1 struct X { 2 int v; 3 typedef int t; 4 }; 5 6 struct YB { 7 typedef YB Y; 8 int value; 9 typedef int type; 10 }; 11 12 struct YBRev { 13 typedef int value; 14 int type; 15 }; 16 17 template<typename T> struct C : X, T { 18 using T::value; 19 using typename T::type; 20 using X::v; 21 using typename X::t; 22 }; 23 24 template<typename T> struct D : X, T { 25 // Mismatch in type/non-type-ness. 26 using typename T::value; 27 using T::type; 28 using X::v; 29 using typename X::t; 30 }; 31 32 template<typename T> struct E : X, T { 33 // Mismatch in using/access-declaration-ness. 34 T::value; 35 X::v; 36 }; 37 38 template<typename T> struct F : X, T { 39 // Mismatch in nested-name-specifier. 40 using T::Y::value; 41 using typename T::Y::type; 42 using ::X::v; 43 using typename ::X::t; 44 }; 45 46 // Force instantiation. 47 typedef C<YB>::type I; 48 typedef D<YBRev>::t I; 49 typedef E<YB>::type I; 50 typedef F<YB>::type I; 51