00-future-2023-12-20-fix-clangd-DEVTOOLSSUPPORT-42012.patch 794 B

1234567891011121314151617181920
  1. diff --git a/include/__numeric/midpoint.h b/include/__numeric/midpoint.h
  2. index 5325f5e..e7db992 100644
  3. --- a/include/__numeric/midpoint.h
  4. +++ b/include/__numeric/midpoint.h
  5. @@ -52,13 +52,8 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
  6. }
  7. -template <class _TPtr>
  8. -_LIBCPP_INLINE_VISIBILITY constexpr
  9. -enable_if_t<is_pointer_v<_TPtr>
  10. - && is_object_v<remove_pointer_t<_TPtr>>
  11. - && ! is_void_v<remove_pointer_t<_TPtr>>
  12. - && (sizeof(remove_pointer_t<_TPtr>) > 0), _TPtr>
  13. -midpoint(_TPtr __a, _TPtr __b) noexcept
  14. +template <class _Tp, enable_if_t<is_object_v<_Tp> && !is_void_v<_Tp> && (sizeof(_Tp) > 0), int> = 0>
  15. +_LIBCPP_HIDE_FROM_ABI constexpr _Tp* midpoint(_Tp* __a, _Tp* __b) noexcept
  16. {
  17. return __a + _VSTD::midpoint(ptrdiff_t(0), __b - __a);
  18. }