[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-23 Thread Mark de Wever via llvm-branch-commits
mordante wrote: > @mordante The PR looks odd. Is this intentional or have you mixed two > branches? This is due to using manually stacked reviews in GitHub. This is patch 3 in a series * patch 1 has landed * I just rebased patch 2 and wait for the CI * patch 3 now believes patches 1 & 2 part

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-23 Thread Hristo Hristov via llvm-branch-commits
Zingam wrote: @mordante The PR looks odd. Is this intentional or have you mixed two branches? https://github.com/llvm/llvm-project/pull/89503 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-23 Thread Louis Dionne via llvm-branch-commits
https://github.com/ldionne approved this pull request. https://github.com/llvm/llvm-project/pull/89503 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-20 Thread Mark de Wever via llvm-branch-commits
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/89503 >From d1f131136d005699a882bf30af9520b06fc898b4 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 17 Apr 2024 21:00:22 +0200 Subject: [PATCH 1/3] [libc++] Makes saturation functions privately available.

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-20 Thread Mark de Wever via llvm-branch-commits
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/89503 >From d1f131136d005699a882bf30af9520b06fc898b4 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 17 Apr 2024 21:00:22 +0200 Subject: [PATCH 1/2] [libc++] Makes saturation functions privately available.

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-20 Thread Mark de Wever via llvm-branch-commits
@@ -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,

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-20 Thread Hristo Hristov via llvm-branch-commits
https://github.com/Zingam edited https://github.com/llvm/llvm-project/pull/89503 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-20 Thread Hristo Hristov via llvm-branch-commits
https://github.com/Zingam edited https://github.com/llvm/llvm-project/pull/89503 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-20 Thread Hristo Hristov via llvm-branch-commits
@@ -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,

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-20 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Mark de Wever (mordante) Changes These functions are useful in the implementation of the time zone database. So expose them with private names. The functions could be exposed before C++ 20, but since libc++ is mostly C++ 17 complete it

[llvm-branch-commits] [libcxx] [libc++] Makes saturation functions privately available. (PR #89503)

2024-04-20 Thread Mark de Wever via llvm-branch-commits
https://github.com/mordante created https://github.com/llvm/llvm-project/pull/89503 These functions are useful in the implementation of the time zone database. So expose them with private names. The functions could be exposed before C++ 20, but since libc++ is mostly C++ 17 complete it seems