mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
These work like next_or_end or prev_or_begin, except that instead of forcing the default value to be the compared against the value, you can specify the value used upon going out of range. i.e., instead of: (x, y) -> (x == y) ? y : std::next(x) We have: (x, y, z) -> (x == y) ? z : std::next(x) This is a strict generalization of next_or_end and prev_or_begin so I re-implemented both routines in terms of the new routines, so no source needed to be updated.
24 KiB
24 KiB