summaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h
diff options
context:
space:
mode:
authormikhnenko <[email protected]>2025-01-20 01:34:08 +0300
committermikhnenko <[email protected]>2025-01-20 01:51:09 +0300
commit2ab2ef14e493133a483a7210a0133c1d8918eee2 (patch)
treeb25a613d75999386160a0ffe41a4f69282a592b3 /contrib/libs/cxxsupp/libcxx/include/__thread/thread.h
parent11def371ff569cef09101fa40c00e6180c3885bc (diff)
Update libcxx to 5 Mar 2024 80f9458cf30d13eef21b09042ea590945c5e64db
commit_hash:c45aa2ed98c2a01fa86b69bac97f40a32bd68ae2
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__thread/thread.h')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__thread/thread.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h b/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h
index f3300752ac9..8db1e28ec7b 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h
@@ -19,7 +19,7 @@
#include <__mutex/mutex.h>
#include <__system_error/system_error.h>
#include <__thread/id.h>
-#include <__threading_support>
+#include <__thread/support.h>
#include <__utility/forward.h>
#include <tuple>
@@ -32,6 +32,9 @@
# pragma GCC system_header
#endif
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
@@ -104,7 +107,7 @@ __thread_specific_ptr<_Tp>::~__thread_specific_ptr() {
template <class _Tp>
void __thread_specific_ptr<_Tp>::set_pointer(pointer __p) {
- _LIBCPP_ASSERT_UNCATEGORIZED(get() == nullptr, "Attempting to overwrite thread local data");
+ _LIBCPP_ASSERT_INTERNAL(get() == nullptr, "Attempting to overwrite thread local data");
std::__libcpp_tls_set(__key_, __p);
}
@@ -154,7 +157,7 @@ public:
_LIBCPP_HIDE_FROM_ABI thread() _NOEXCEPT : __t_(_LIBCPP_NULL_THREAD) {}
#ifndef _LIBCPP_CXX03_LANG
- template <class _Fp, class... _Args, class = __enable_if_t<!is_same<__remove_cvref_t<_Fp>, thread>::value> >
+ template <class _Fp, class... _Args, __enable_if_t<!is_same<__remove_cvref_t<_Fp>, thread>::value, int> = 0>
_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS explicit thread(_Fp&& __f, _Args&&... __args);
#else // _LIBCPP_CXX03_LANG
template <class _Fp>
@@ -200,7 +203,7 @@ _LIBCPP_HIDE_FROM_ABI void* __thread_proxy(void* __vp) {
return nullptr;
}
-template <class _Fp, class... _Args, class >
+template <class _Fp, class... _Args, __enable_if_t<!is_same<__remove_cvref_t<_Fp>, thread>::value, int> >
thread::thread(_Fp&& __f, _Args&&... __args) {
typedef unique_ptr<__thread_struct> _TSPtr;
_TSPtr __tsp(new __thread_struct);
@@ -251,4 +254,6 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(thread& __x, thread& __y) _NOEXCEPT { __x
_LIBCPP_END_NAMESPACE_STD
+_LIBCPP_POP_MACROS
+
#endif // _LIBCPP___THREAD_THREAD_H