Skip to main content

Practice ยท 1 of 3

A constexpr Config Parser

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.

Difficulty: advanced

Back to lesson: Practice: Compile-Time Computing