[libcxx-commits] [PATCH] D101678: [libc++] [LIBCXX-DEBUG-FIXME] std::advance shouldn't use ADL `>=` on the _Distance type.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat May 1 10:04:42 PDT 2021
Quuxplusone updated this revision to Diff 342160.
Quuxplusone added a comment.
poke buildkite
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101678/new/
https://reviews.llvm.org/D101678
Files:
libcxx/include/iterator
libcxx/test/std/iterators/iterator.primitives/iterator.operations/robust_against_adl.pass.cpp
Index: libcxx/test/std/iterators/iterator.primitives/iterator.operations/robust_against_adl.pass.cpp
===================================================================
--- libcxx/test/std/iterators/iterator.primitives/iterator.operations/robust_against_adl.pass.cpp
+++ libcxx/test/std/iterators/iterator.primitives/iterator.operations/robust_against_adl.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-DEBUG-FIXME
-
// <iterator>
#include <iterator>
Index: libcxx/include/iterator
===================================================================
--- libcxx/include/iterator
+++ libcxx/include/iterator
@@ -526,10 +526,10 @@
inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
void advance(_InputIter& __i, _Distance __orig_n)
{
- _LIBCPP_ASSERT(__orig_n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
- "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
_IntegralSize __n = __orig_n;
+ _LIBCPP_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
+ "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
_VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101678.342160.patch
Type: text/x-patch
Size: 1416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210501/d4f10029/attachment.bin>
More information about the libcxx-commits
mailing list