constexpr int f(int idx) { constexpr auto arr = std::array<int, 1'000'000'000>{}; // stack overflow? return arr[idx]; } int main() { return f(1024); } - Does
arroccupy the stack space? - Is the compiler permitted to make
arrnot occupy the stack space? - Is it mandated for the compiler to avoid
arroccupies the stack space?
staticon it, or does it already have static storage duration?". See the linked duplicates.