Practice · 1 of 3
A constexpr Config Parser
CHALLENGE
Difficulty: advanced+25 XP
Implement parseSpec as a constexpr function: split on ;, each entry on the first :, trim spaces, store name and int value, and return the count. The test bakes the result into a compile-time constant — the proof that the whole parser runs before main.
Press Submit to check your solution.
Back to lesson: Practice: Compile-Time Computing