Generic Range Algorithms – Ole Begemann
Half-open and closed ranges are not easily convertible to each other. If you implement an algorithm that works on ranges, that usually means you have to provide two overloads. But sometimes, making your code more generic is the better solution.