summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/cxx-templates-a.h
blob: 37e3426fc0b305e522ef1e2bcf4a3a5c4b24d71c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@import cxx_templates_common;

template<typename T> T f() { return T(); }
template<typename T> T f(T);
namespace N {
  template<typename T> T f() { return T(); }
  template<typename T> T f(T);
}

template<int N> int template_param_kinds_1();
template<template<typename T, int, int> class> int template_param_kinds_2();
template<template<typename T, typename U, T> class> int template_param_kinds_3();

template<typename T> struct SomeTemplate<T*>;
template<typename T> struct SomeTemplate<T*> {};
typedef SomeTemplate<int*> SomeTemplateIntPtr;

template<typename T> void PerformDelayedLookup(T &t) {
  t.f();
  typename T::Inner inner;
  FoundByADL(t);
}

template<typename T> void PerformDelayedLookupInDefaultArgument(T &t, int a = (FoundByADL(T()), 0)) {}

template<typename T> struct RedeclaredAsFriend {};

void use_some_template_a() {
  SomeTemplate<char[2]> a;
  SomeTemplate<char[1]> b, c;
  b = c;
}
OpenPOWER on IntegriCloud