On Sunday, 26 March 2023 at 02:16:15 UTC, Steven Schveighoffer
wrote:
On 3/25/23 9:45 AM, Olivier Prat wrote:
[...]
It's because a Range keeps a copy of the array (Array is a
reference counted type). Since that is labeled `const`, then
editing the Range is forbidden.
Inside SortedRange, i
On 3/25/23 9:45 AM, Olivier Prat wrote:
Would someone explain the exact nature of this error as I fail to
understand as how just telling that an Array ConstRange is assumed to be
sorted actually modifies anything??
It's because a Range keeps a copy of the array (Array is a reference
counted
On 3/25/23 09:31, Olivier Prat wrote:
On Saturday, 25 March 2023 at 13:45:36 UTC, Olivier Prat wrote:
I'm trying to call assumeSorted on a const(Array) using this code
snippet:
[...]
In a similar fashion, a number of methods in SortedRange do not compile
if called on a const(SortedRange) or
On Saturday, 25 March 2023 at 13:45:36 UTC, Olivier Prat wrote:
I'm trying to call assumeSorted on a const(Array) using this
code snippet:
[...]
In a similar fashion, a number of methods in SortedRange do not
compile if called on a const(SortedRange) or
immutable(SortedRange), such as lengt