diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-08-23 02:59:46 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-09-19 18:20:21 -0700 |
| commit | 1c8f0b8909f342201f84def1efb8c6fb4386cc2c (patch) | |
| tree | b58a1488ff85440a65565474627add3fdc66b32e /lib/libcxx/include/__thread/thread.h | |
| parent | d13bc04cb4c4c2f0806b9d9c676cb013ea888828 (diff) | |
| download | zig-1c8f0b8909f342201f84def1efb8c6fb4386cc2c.tar.gz zig-1c8f0b8909f342201f84def1efb8c6fb4386cc2c.zip | |
libcxx: Update to LLVM 19.
* Moved the tz.cpp patch to experimental/tzdb.cpp.
* Extended the __config_site patch to a few more files.
Diffstat (limited to 'lib/libcxx/include/__thread/thread.h')
| -rw-r--r-- | lib/libcxx/include/__thread/thread.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/libcxx/include/__thread/thread.h b/lib/libcxx/include/__thread/thread.h index 0ecaac1b01..d2254a695f 100644 --- a/lib/libcxx/include/__thread/thread.h +++ b/lib/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> @@ -65,18 +65,17 @@ class __thread_specific_ptr { // Only __thread_local_data() may construct a __thread_specific_ptr // and only with _Tp == __thread_struct. - static_assert((is_same<_Tp, __thread_struct>::value), ""); + static_assert(is_same<_Tp, __thread_struct>::value, ""); __thread_specific_ptr(); friend _LIBCPP_EXPORTED_FROM_ABI __thread_specific_ptr<__thread_struct>& __thread_local_data(); - __thread_specific_ptr(const __thread_specific_ptr&); - __thread_specific_ptr& operator=(const __thread_specific_ptr&); - _LIBCPP_HIDDEN static void _LIBCPP_TLS_DESTRUCTOR_CC __at_thread_exit(void*); public: typedef _Tp* pointer; + __thread_specific_ptr(const __thread_specific_ptr&) = delete; + __thread_specific_ptr& operator=(const __thread_specific_ptr&) = delete; ~__thread_specific_ptr(); _LIBCPP_HIDE_FROM_ABI pointer get() const { return static_cast<_Tp*>(__libcpp_tls_get(__key_)); } @@ -157,7 +156,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> @@ -203,7 +202,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); |
