Bug 17032 – Sortedness of a range should be propagated

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-12-26T06:42:49Z
Last change time
2024-12-01T16:29:05Z
Assigned to
No Owner
Creator
Seb
Moved to GitHub: phobos#9704 →

Comments

Comment #0 by greeenify — 2016-12-26T06:42:49Z
Since https://github.com/dlang/phobos/pull/4907, find has a specialization for SortedRange, however if another range function was applied before (e.g. `take`) the check won't work. It's probably possible to check the type and see if there's a SortedRange occuring. If so a simple solution would be to iterate towards it and check whether the struct on the way have a `propagatesSortedness` property. However this of course won't work for something like `retro`.
Comment #1 by robert.schadek — 2024-12-01T16:29:05Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9704 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB