• Home
  • Raw
  • Download

Lines Matching refs:constexpr

5     template<typename T> static constexpr T get() { return T(); }  in get()
11 constexpr int j = A::get<int>();
13 template<typename T> constexpr int consume(T);
17 template<typename T> constexpr int consume(T) { return 0; } in consume()
19 constexpr int l = consume(0);
21constexpr int m = k; // expected-error {{constant expression}} expected-note {{initializer of 'k'}}
25 template<typename T> constexpr T f(T n) { return n; } in f()
36 template<typename T> constexpr T f(T n) { return n; } in f()
46 template<typename T> constexpr T f(T t) { return t; } in f()
65 constexpr int m = S<int>::k; // ok
66constexpr int o = n; // expected-error {{constant expression}} expected-note {{initializer of 'n'}}
75 constexpr int n = const_cast<int&>(S<int>::r);
105 constexpr S() : n(0) {} in S()
106 constexpr S(const S&) : n(T::error) {} // expected-error {{has no members}} in S()
114 template<int x> constexpr int f() { return x; } in f()
121 constexpr bool Integral() { in Integral()
141 template<class> constexpr int bar() { return 0; } in bar()
148 constexpr S1() {} in S1()
149 constexpr operator int() const { return 0; } in operator int()
154 constexpr S2() {} in S2()
155 constexpr operator int() const { return 123456; } in operator int()
161 template <typename> constexpr bool foo() { return true; } in foo()
173 static constexpr bool f() { return sizeof(T) < U::size; } in f()
179 struct U { static constexpr int size = 2; };
186 struct duration { constexpr duration() {} }; in duration()
190 constexpr duration max = duration(); in sleep_for()
200 template<typename T> constexpr S(T) : n(T::error) {} // expected-error {{no members}} in S()