constant-expression-cxx1y.cpp | 191 constexpr int do_stuff(int k1, int k2) { function in namespace:array_resize 196 static_assert(do_stuff(1, 2) == 3, ""); 197 static_assert(do_stuff(0, 0) == 5, ""); 198 static_assert(do_stuff(1233, 1233) == 5, ""); 199 static_assert(do_stuff(1233, 0) == 1, ""); 200 static_assert(do_stuff(1234, 0) == 1, ""); // expected-error {{constant expression}} expected-note {{in call}} 201 static_assert(do_stuff(1235, 0) == 1, ""); // expected-error {{constant expression}} expected-note {{in call}} 202 static_assert(do_stuff(-1, 0) == 1, ""); // expected-error {{constant expression}} expected-note {{in call}}
|