aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2025-01-20 01:34:08 +0300
committermikhnenko <mikhnenko@yandex-team.com>2025-01-20 01:51:09 +0300
commit2ab2ef14e493133a483a7210a0133c1d8918eee2 (patch)
treeb25a613d75999386160a0ffe41a4f69282a592b3 /contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h
parent11def371ff569cef09101fa40c00e6180c3885bc (diff)
downloadydb-2ab2ef14e493133a483a7210a0133c1d8918eee2.tar.gz
Update libcxx to 5 Mar 2024 80f9458cf30d13eef21b09042ea590945c5e64db
commit_hash:c45aa2ed98c2a01fa86b69bac97f40a32bd68ae2
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h
index a059705125..da748d7255 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/nth_element.h
@@ -23,6 +23,9 @@
# pragma GCC system_header
#endif
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Compare, class _RandomAccessIterator>
@@ -114,12 +117,12 @@ __nth_element(
while (true) {
while (!__comp(*__first, *__i)) {
++__i;
- _LIBCPP_ASSERT_UNCATEGORIZED(
+ _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__i != __last,
"Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
}
do {
- _LIBCPP_ASSERT_UNCATEGORIZED(
+ _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__j != __first,
"Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
--__j;
@@ -150,13 +153,13 @@ __nth_element(
// __m still guards upward moving __i
while (__comp(*__i, *__m)) {
++__i;
- _LIBCPP_ASSERT_UNCATEGORIZED(
+ _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__i != __last,
"Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
}
// It is now known that a guard exists for downward moving __j
do {
- _LIBCPP_ASSERT_UNCATEGORIZED(
+ _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
__j != __first,
"Would read out of bounds, does your comparator satisfy the strict-weak ordering requirement?");
--__j;
@@ -253,4 +256,6 @@ nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomA
_LIBCPP_END_NAMESPACE_STD
+_LIBCPP_POP_MACROS
+
#endif // _LIBCPP___ALGORITHM_NTH_ELEMENT_H