Date: Sun, 14 Sep 2025 15:51:43 +0200
The std::set_intersection algorithm forbids overlap of the input ranges
with the output range, but if first1 or first2 and result would be equal,
the algorithm could still work(see cppreference for possible
implementation).
This would allow inplace execution without memory allocation, which is a
big plus.
26.8.7.4 set_intersection (wording)
replace: The resulting range does not overlap with either of the original
ranges. <https://eel.is/c++draft/set.intersection#2.sentence-2>
with: result may be equal to first1 or first2, otherwise the resulting
range does not overlap with either of the original ranges.
PS: I am quite sure my statement is correct and I am not making a fool out
of myself. Still confirmation of my claim would be great.
with the output range, but if first1 or first2 and result would be equal,
the algorithm could still work(see cppreference for possible
implementation).
This would allow inplace execution without memory allocation, which is a
big plus.
26.8.7.4 set_intersection (wording)
replace: The resulting range does not overlap with either of the original
ranges. <https://eel.is/c++draft/set.intersection#2.sentence-2>
with: result may be equal to first1 or first2, otherwise the resulting
range does not overlap with either of the original ranges.
PS: I am quite sure my statement is correct and I am not making a fool out
of myself. Still confirmation of my claim would be great.
Received on 2025-09-14 13:52:00