Clang Project

clang_source_code/test/Modules/Inputs/merge-using-decls/b.h
1struct X {
2  int v;
3  typedef int t;
4};
5
6struct YB {
7  typedef YB Y;
8  int value;
9  typedef int type;
10};
11
12struct YBRev {
13  typedef int value;
14  int type;
15};
16
17template<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
24template<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#if __cplusplus <= 199711L // C++11 does not allow access declarations
33template<typename T> struct E : X, T {
34  // Mismatch in using/access-declaration-ness.
35  T::value;
36  X::v;
37};
38#endif
39
40template<typename T> struct F : X, T {
41  // Mismatch in nested-name-specifier.
42  using T::Y::value;
43  using typename T::Y::type;
44  using ::X::v;
45  using typename ::X::t;
46};
47
48// Force instantiation.
49typedef C<YB>::type I;
50typedef D<YBRev>::t I;
51
52#if __cplusplus <= 199711L // C++11 does not allow access declarations
53typedef E<YB>::type I;
54#endif
55
56typedef F<YB>::type I;
57