GotW #101 Solution: Preconditions, Part 2 (Difficulty: 7/10)
Sutter's Mill
MARCH 25, 2021
Consider these functions, expanded from an article by Andrzej Krzemieński: [1] … How many ways could a caller of each function get the arguments wrong, but that would silently compile without error? But if the sight of these function signatures has had you pulling your hair and shouting “use the type system, Luke!”
Let's personalize your content