[libcxx-commits] [PATCH] D131395: [libc++] Implement `lexicographical_compare_three_way`
Adrian Vogelsgesang via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 13 00:48:19 PST 2023
avogelsgesang added inline comments.
================
Comment at: libcxx/test/std/algorithms/robust_re_difference_type.compile.pass.cpp:148-153
+#if TEST_STD_VER > 17
+ // `lexicographical_compare_three_way` static_asserts that the difference type is an integer, as
+ // required by https://eel.is/c++draft/iterator.iterators#2.2
+ //(void)std::lexicographical_compare_three_way(first, last, first2, last2);
+ //(void)std::lexicographical_compare_three_way(first, last, first2, last2, std::compare_three_way());
+#endif
----------------
h-vetinari wrote:
> Is it intentional that these tests are commented out? If so, the comment doesn't really elucidate why, or what would be necessary to enable them.
Yes, commenting them out was intentional, see discussion in https://reviews.llvm.org/D131395#inline-1342123
I hoped that the comment
>`lexicographical_compare_three_way` static_asserts that the difference type is an integer, as required by https://eel.is/c++draft/iterator.iterators#2.2
would explain why `lexicographical_compare_three_way` would reject the difference_type used in this test here, but now I realize that the comment is missing the *signed* integer requirement...
On 2nd thought: maybe it would have been sufficient to use `PickyIterator<void**, unsigned long>(a);` instead of `PickyIterator<void**, long>(a);` ...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131395/new/
https://reviews.llvm.org/D131395
More information about the libcxx-commits
mailing list