brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 207d705 Raw
66 lines · c
1template<typename T> class Vector;2 3template<typename T> class List {4public:5  void push_back(T);6 7  struct node {};8  node *head;9  unsigned size;10};11 12extern List<double> *instantiateListDoubleDeclaration;13extern List<long> *instantiateListLongDeclaration;14 15namespace A {16  class Y {17    template <typename T> friend class WhereAmI;18  };19}20 21template <typename T> class A::WhereAmI {22public:23  static void func() {}24};25 26template<typename T> struct Outer {27  struct Inner {};28};29 30template<bool, bool> struct ExplicitInstantiation {31  void f() {}32};33 34template<typename> struct DelayUpdates {};35 36template<typename T> struct OutOfLineInline {37  void f();38  void g();39  void h();40};41template<typename T> inline void OutOfLineInline<T>::f() {}42template<typename T> inline void OutOfLineInline<T>::g() {}43template<typename T> inline void OutOfLineInline<T>::h() {}44 45namespace EmitDefaultedSpecialMembers {46  template<typename T> struct SmallVectorImpl {47    SmallVectorImpl() {}48    ~SmallVectorImpl() {} // non-trivial dtor49  };50  template<typename T, unsigned N> struct SmallVector : SmallVectorImpl<T> {51    // trivial dtor52  };53  template<unsigned N> struct SmallString : SmallVector<char, N> {54    // trivial dtor55  };56}57 58template<typename T> struct WithUndefinedStaticDataMember {59  static T undefined;60};61 62template<typename T> struct __attribute__((packed, aligned(2))) WithAttributes {63  T value;64};65WithAttributes<int> *get_with_attributes();66