Date: Sun, 14 Sep 2025 21:38:12 +0300
On 9/14/25 20:38, Arthur O'Dwyer via Std-Proposals wrote:
> If the input ranges overlap, the output can generally only
> coincide with
> the first range (the source for the copy). Otherwise you can get
> wrong
> results with a weak comparator.
>
>
> I don't think this is true. The output range could be the same as the
> first input range, or it could be the same as the second input range, or
> it could be unrelated, or it could start before either input range.
> The output range obviously can't point into the /*middle*/ of either
> input range, but nobody was claiming that.
At least on paper, when the output is the same as the first input range,
it can point to the middle of the second input range (though it does
feel like asking for trouble). The transitivity of the equivalence
relation should make it work. If you swap in1 and in2 in the example
from the other mail, all three cases pass.
> If the input ranges overlap, the output can generally only
> coincide with
> the first range (the source for the copy). Otherwise you can get
> wrong
> results with a weak comparator.
>
>
> I don't think this is true. The output range could be the same as the
> first input range, or it could be the same as the second input range, or
> it could be unrelated, or it could start before either input range.
> The output range obviously can't point into the /*middle*/ of either
> input range, but nobody was claiming that.
At least on paper, when the output is the same as the first input range,
it can point to the middle of the second input range (though it does
feel like asking for trouble). The transitivity of the equivalence
relation should make it work. If you swap in1 and in2 in the example
from the other mail, all three cases pass.
Received on 2025-09-14 18:38:18