[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)
Hristo Hristov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Apr 20 08:09:17 PDT 2024
================
@@ -107,6 +107,35 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Rp saturate_cast(_Tp __x) noexcept {
return static_cast<_Rp>(__x);
}
+#endif // _LIBCPP_STD_VER >= 20
+
+#if _LIBCPP_STD_VER >= 26
+
+template <__libcpp_integer _Tp>
+_LIBCPP_HIDE_FROM_ABI constexpr _Tp add_sat(_Tp __x, _Tp __y) noexcept {
+ return std::add_sat(__x, __y);
----------------
Zingam wrote:
```suggestion
return __add_sat(__x, __y);
```
Isn't this what you mean?
https://github.com/llvm/llvm-project/pull/89503
More information about the llvm-branch-commits
mailing list