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