Which Line Refuses

constexpr int twice(int n)  { return 2 * n; }
consteval int thrice(int n) { return 3 * n; }

int runtime_value();          // defined elsewhere

int main() {
    constexpr int a = twice(4);          // line 1
    int b = twice(runtime_value());      // line 2
    constexpr int c = thrice(4);         // line 3
    int d = thrice(runtime_value());     // line 4
}

Which lines are ill-formed?

A

Lines 3 and 4: consteval may only initialize constinit variables, never constexpr ones.

B

Line 4 only.

C

Lines 2 and 4: neither argument is a constant expression, so neither call can be evaluated at compile time.

D

Line 2 only: a constexpr function requires constant arguments, while consteval relaxes that for non-constant contexts.