Richard Smith | 32952e1 | 2014-10-14 02:00:47 +0000 | [diff] [blame] | 1 | struct X { |
| 2 | int v; |
| 3 | typedef int t; |
| 4 | }; |
| 5 | |
| 6 | struct YA { |
| 7 | int value; |
| 8 | typedef int type; |
| 9 | }; |
| 10 | |
| 11 | template<typename T> struct C : X, T { |
| 12 | using T::value; |
| 13 | using typename T::type; |
| 14 | using X::v; |
| 15 | using typename X::t; |
| 16 | }; |
| 17 | |
| 18 | template<typename T> struct D : X, T { |
| 19 | using T::value; |
| 20 | using typename T::type; |
| 21 | using X::v; |
| 22 | using typename X::t; |
| 23 | }; |
| 24 | |
| 25 | template<typename T> struct E : X, T { |
| 26 | using T::value; |
| 27 | using typename T::type; |
| 28 | using X::v; |
| 29 | using typename X::t; |
| 30 | }; |
| 31 | |
| 32 | template<typename T> struct F : X, T { |
| 33 | using T::value; |
| 34 | using typename T::type; |
| 35 | using X::v; |
| 36 | using typename X::t; |
| 37 | }; |
| 38 | |
| 39 | // Force instantiation. |
| 40 | typedef C<YA>::type I; |
| 41 | typedef D<YA>::type I; |
| 42 | typedef E<YA>::type I; |
| 43 | typedef F<YA>::type I; |