[libcxx-commits] [PATCH] D132268: [libc++][spaceship] Implement `operator<=>` for `vector`
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 5 07:50:45 PDT 2023
philnik added a comment.
In D132268#4321925 <https://reviews.llvm.org/D132268#4321925>, @H-G-Hristov wrote:
> @philnik Thank you for the review!
>
> In D132268#4320495 <https://reviews.llvm.org/D132268#4320495>, @philnik wrote:
>
>> Looks basically good, but I'd like to understand the `__debug_three_way_comp` change before approving.
>
> This change was proposed by avogelsang above actually, as without it the tests of `vector<bool>` build fails with:
>
>> lexicographical_compare_three_way.h:103:12: error: no matching function for call to '__lexicographical_compare_three_way_fast_path'
>>
>> return std::__lexicographical_compare_three_way_fast_path(
>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> vector:3296:17: note: in instantiation of function template specialization 'std::lexicographical_compare_three_way<std::__bit_iterator<std::vector<bool>, true, 0>, std::__bit_iterator<std::vector<bool>, true, 0>, std::strong_ordering (*)(const bool &, const bool &)>' requested here
>>
>> return std::lexicographical_compare_three_way(
Ah OK. It's for iterators not returning an lvalue reference. In this case I think it would be better to forward the arguments, since that will definitely be correct.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132268/new/
https://reviews.llvm.org/D132268
More information about the libcxx-commits
mailing list