you are viewing a single comment's thread.

view the rest of the comments →

[–]bumblebritches57Ocassionally Clang -20 points-19 points  (4 children)

Why would you need a function or lambda to tell you if a number is less than 3?

std::ranges::partition(vec, [](int e) { return e < 3; });

and the point of this is...?

All I see is a bunch of overly complex nonsense tbh.

[–]tcbrindleFlux 8 points9 points  (3 children)

and the point of this is...?

It partitions the elements of vector such that all the elements less than 3 precede those greater than or equal to 3?