All challenges
Code AnalysisIntermediate 60s

constexpr used as array bound

Why does `constexpr int n = 5; int arr[n];` compile but `const int n = 5; int arr[n];` (with a non-constant-init) may not at namespace scope in strict C++?

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle