[libcxx-commits] [libcxx] [libc++][numeric] Modernized `std::midpoint` (PR #174596)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 7 00:00:27 PST 2026


================
@@ -35,8 +32,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 20
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr enable_if_t<is_integral_v<_Tp> && !is_same_v<bool, _Tp> && !is_null_pointer_v<_Tp>, _Tp>
-midpoint(_Tp __a, _Tp __b) noexcept _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK {
+  requires(is_integral_v<_Tp> && !is_same_v<remove_cv_t<_Tp>, bool>)
----------------
H-G-Hristov wrote:

Oops :) Sorry! Thanks for pointing this out. Done!

https://github.com/llvm/llvm-project/pull/174596


More information about the libcxx-commits mailing list