Skip to main content

Practice ยท 1 of 3

describe(...) with if constexpr

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.

Difficulty: advanced

Back to lesson: Practice: if constexpr and NTTPs