brintos

brintos / llvm-project-archived public Read only

0
0
Text · 871 B · 2469cbd Raw
56 lines · c
1struct X {2  int v;3  typedef int t;4  void f(X);5};6 7struct YA {8  int value;9  typedef int type;10};11 12struct Z {13  void f(Z);14};15 16template<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 23template<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 30template<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 37template<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.45typedef C<YA>::type I;46typedef D<YA>::type I;47typedef E<YA>::type I;48typedef F<YA>::type I;49 50#if __cplusplus >= 201702L51template<typename ...T> struct G : T... {52  using T::f...;53};54using Q = decltype(G<X, Z>());55#endif56