aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/include/__condition_variable/condition_variable.h
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-05-09 01:52:26 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-05-09 01:52:26 -0700
commitbcb534c295d5cc6fd63caa570cc08e6b148a507c (patch)
tree0b17cb1e632d894f50f25e550d5113f232b0e877 /lib/libcxx/include/__condition_variable/condition_variable.h
parentd9b00ee4ba48717ff6b306a6f9419e7b604ac04b (diff)
parent74f52954b9cb40d59d80b839b45bb859146731a7 (diff)
downloadzig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.tar.gz
zig-bcb534c295d5cc6fd63caa570cc08e6b148a507c.zip
Merge branch 'llvm18'
Upgrades the LLVM, Clang, and LLD dependencies to LLVM 18.x Related to #16270
Diffstat (limited to 'lib/libcxx/include/__condition_variable/condition_variable.h')
-rw-r--r--lib/libcxx/include/__condition_variable/condition_variable.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/libcxx/include/__condition_variable/condition_variable.h b/lib/libcxx/include/__condition_variable/condition_variable.h
index 7cbf21fe73..4d8e590e29 100644
--- a/lib/libcxx/include/__condition_variable/condition_variable.h
+++ b/lib/libcxx/include/__condition_variable/condition_variable.h
@@ -92,9 +92,8 @@ private:
};
#endif // !_LIBCPP_HAS_NO_THREADS
-template <class _Rep, class _Period>
-inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<is_floating_point<_Rep>::value, chrono::nanoseconds>
-__safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
+template <class _Rep, class _Period, __enable_if_t<is_floating_point<_Rep>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI chrono::nanoseconds __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
using namespace chrono;
using __ratio = ratio_divide<_Period, nano>;
using __ns_rep = nanoseconds::rep;
@@ -113,9 +112,8 @@ __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
return nanoseconds(static_cast<__ns_rep>(__result_float));
}
-template <class _Rep, class _Period>
-inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<!is_floating_point<_Rep>::value, chrono::nanoseconds>
-__safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
+template <class _Rep, class _Period, __enable_if_t<!is_floating_point<_Rep>::value, int> = 0>
+inline _LIBCPP_HIDE_FROM_ABI chrono::nanoseconds __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d) {
using namespace chrono;
if (__d.count() == 0) {
return nanoseconds(0);