Created on 2021-09-17.00:00:00 last changed 38 months ago
[ 2021-09-24 infinite ranges are invalid by [iterator.requirements.general] p10, so undefined by p12. Might be nice to relax this in future, but needs a paper. Status changed: New → NAD. ]
When implementing C++23 new ranges::starts_with and ranges::ends_with for MSVC we came around some issues regarding infinite ranges.
In short, there is no possible answers to ends_with, if the second range is infinite. Similarly, there is no meaningful answer to starts_with if both ranges are infinite. We should constraint both algorithms to forbid those corner cases (preferred resolution), or explicitly specify a given return value for those (The reasonable choice would be "return false;")History | |||
---|---|---|---|
Date | User | Action | Args |
2021-09-24 17:58:46 | admin | set | messages: + msg12077 |
2021-09-24 17:58:46 | admin | set | status: new -> nad |
2021-09-17 00:00:00 | admin | create |