Practice · 1 of 2
Braces Reject Narrowing
CHALLENGE
Difficulty: advanced+25 XP
Complete Config with name (std::string, default "unset"), port (int, default 0), and tags (vector<string>, default empty), then implement int truncateToInt(double d) that compiles **only** because it avoids brace narrowing.
Press Submit to check your solution.
Back to lesson: Practice: Initialization Traps