Skip to content

Commit e64a238

Browse files
committed
Fix clangd OOM by importing commit from future
import `c37734d40904ebe9c7cc345aab6be3649b0a903c` from upstream 33a38085aa39d27a75d5a86497970a623adc7460
1 parent 3129b5d commit e64a238

File tree

1 file changed

+2
-7
lines changed
  • contrib/libs/cxxsupp/libcxx/include/__numeric

1 file changed

+2
-7
lines changed

contrib/libs/cxxsupp/libcxx/include/__numeric/midpoint.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,8 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
5252
}
5353

5454

55-
template <class _TPtr>
56-
_LIBCPP_INLINE_VISIBILITY constexpr
57-
enable_if_t<is_pointer_v<_TPtr>
58-
&& is_object_v<remove_pointer_t<_TPtr>>
59-
&& ! is_void_v<remove_pointer_t<_TPtr>>
60-
&& (sizeof(remove_pointer_t<_TPtr>) > 0), _TPtr>
61-
midpoint(_TPtr __a, _TPtr __b) noexcept
55+
template <class _Tp, enable_if_t<is_object_v<_Tp> && !is_void_v<_Tp> && (sizeof(_Tp) > 0), int> = 0>
56+
_LIBCPP_HIDE_FROM_ABI constexpr _Tp* midpoint(_Tp* __a, _Tp* __b) noexcept
6257
{
6358
return __a + _VSTD::midpoint(ptrdiff_t(0), __b - __a);
6459
}

0 commit comments

Comments
 (0)