constant_expression
constant_expression (상수 표현식)
상수 표현식은 컴파일 시간에 값이 평가될 수 있는 표현식이에요. 배열 크기·템플릿 인자 등에 사용돼요.
출처: cppreference
본문
상수 표현식은 컴파일러가 컴파일 시간에 계산할 수 있는 표현식이에요.
constexpr int n = 10;
int arr[n]; // n은 상수 표현식
constexpr, consteval과 밀접한 관련이 있어요.