Skip to main content

Practice · 1 of 3

describe(...) with if constexpr

CHALLENGE
Difficulty: advanced+25 XP

Implement describe(args...): fold over the pack, and use if constexpr on each element's type to pick its prefix — int(...), dbl(...) (via std::to_string), or str(...) for anything else. Elements join with single spaces.

Back to lesson: Practice: if constexpr and NTTPs