Open
Description
With -std=c++23
, this compiles, even though it really shouldn’t (https://godbolt.org/z/xKjPEP34s):
consteval int foo(int n) {
int x[n];
return 12;
}
static_assert(foo(-1));
With -std=c++23
, this compiles, even though it really shouldn’t (https://godbolt.org/z/xKjPEP34s):
consteval int foo(int n) {
int x[n];
return 12;
}
static_assert(foo(-1));