| 1 |
struct X { |
| 2 |
int v; |
| 3 |
typedef int t; |
| 4 |
void f(X); |
| 5 |
}; |
| 6 |
|
| 7 |
struct YA { |
| 8 |
int value; |
| 9 |
typedef int type; |
| 10 |
}; |
| 11 |
|
| 12 |
struct Z { |
| 13 |
void f(Z); |
| 14 |
}; |
| 15 |
|
| 16 |
template<typename T> struct C : X, T { |
| 17 |
using T::value; |
| 18 |
using typename T::type; |
| 19 |
using X::v; |
| 20 |
using typename X::t; |
| 21 |
}; |
| 22 |
|
| 23 |
template<typename T> struct D : X, T { |
| 24 |
using T::value; |
| 25 |
using typename T::type; |
| 26 |
using X::v; |
| 27 |
using typename X::t; |
| 28 |
}; |
| 29 |
|
| 30 |
template<typename T> struct E : X, T { |
| 31 |
using T::value; |
| 32 |
using typename T::type; |
| 33 |
using X::v; |
| 34 |
using typename X::t; |
| 35 |
}; |
| 36 |
|
| 37 |
template<typename T> struct F : X, T { |
| 38 |
using T::value; |
| 39 |
using typename T::type; |
| 40 |
using X::v; |
| 41 |
using typename X::t; |
| 42 |
}; |
| 43 |
|
| 44 |
// Force instantiation. |
| 45 |
typedef C<YA>::type I; |
| 46 |
typedef D<YA>::type I; |
| 47 |
typedef E<YA>::type I; |
| 48 |
typedef F<YA>::type I; |
| 49 |
|
| 50 |
#if __cplusplus >= 201702L |
| 51 |
template<typename ...T> struct G : T... { |
| 52 |
using T::f...; |
| 53 |
}; |
| 54 |
using Q = decltype(G<X, Z>()); |
| 55 |
#endif |