Home | History | Annotate | Download | only in SemaTemplate

Lines Matching defs:int

7     int n = get<int>();
11 constexpr int j = A::get<int>();
13 template<typename T> constexpr int consume(T);
15 const int k = consume(0); // expected-note {{here}}
17 template<typename T> constexpr int consume(T) { return 0; }
19 constexpr int l = consume(0);
21 constexpr int m = k; // expected-error {{constant expression}} expected-note {{initializer of 'k'}}
37 int f() {
48 template<int n> struct S { };
58 int *p, *q = h(p);
62 template<typename T> struct S { static const int k; };
63 const int n = S<int>::k; // expected-note {{here}}
64 template<typename T> const int S<T>::k = 0;
65 constexpr int m = S<int>::k; // ok
66 constexpr int o = n; // expected-error {{constant expression}} expected-note {{initializer of 'n'}}
70 const int k = 5;
72 static volatile int &r;
74 template<typename T> volatile int &S<T>::r = const_cast<volatile int&>(k);
75 constexpr int n = const_cast<int&>(S<int>::r);
98 int n;
100 struct U : S<int> {};
101 decltype(U(U())) u; // ok, don't instantiate S<int>::S() because it wasn't declared constexpr
107 int n;
109 struct U : S<int> {}; // expected-note {{instantiation}}
114 template<int x> constexpr int f() { return x; }
115 template<int i> void ovf(int (&x)[f<i>()]);
116 void f() { int x[10]; ovf<10>(x); }
124 template<typename T, bool Int = Integral<T>()>
132 using type = int;
140 template<int> struct foo {};
141 template<class> constexpr int bar() { return 0; }
143 auto foobar_ = foobar<int>();
149 constexpr operator int() const { return 0; }
151 int k1 = sizeof(short{S1(S1())});
155 constexpr operator int() const { return 123456; }
157 int k2 = sizeof(short{S2(S2())}); // expected-error {{cannot be narrowed}} expected-note {{insert an explicit cast to silence this issue}}
164 int main() { baz<int>(); }
179 struct U { static constexpr int size = 2; };
182 void i() { F<int>::g<U>(); } // expected-error {{no matching function}}
201 int n;
204 int f(S);
205 int f(int);