Louis Dionne 02540b2f6d
[libc++] Make sure ranges algorithms and views handle boolean-testable correctly (#69378)
Before this patch, we would fail to implicitly convert the result of
predicates to bool, which means we'd potentially perform a copy or move
construction of the boolean-testable, which isn't allowed. The same
holds true for comparing iterators against sentinels, which is allowed
to return a boolean-testable type.

We already had tests aiming to ensure correct handling of these types,
but they failed to provide appropriate coverage in several cases due to
guaranteed RVO. This patch fixes the tests, adds tests for missing
algorithms and views, and fixes the actual problems in the code.

Fixes #69074
2023-11-06 21:19:49 -10:00
..
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-01-12 18:28:41 +01:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-10-22 10:25:49 +02:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00
2023-06-06 13:58:52 -07:00