From 145449b1e420787bb99721a429341fa6be3adfb6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 3 Jul 2022 16:10:23 +0200 Subject: Vendor import of llvm-project main llvmorg-15-init-15358-g53dc0f107877. --- libcxx/include/thread | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'libcxx/include/thread') diff --git a/libcxx/include/thread b/libcxx/include/thread index 27756e42cdcb..1c8eb198986d 100644 --- a/libcxx/include/thread +++ b/libcxx/include/thread @@ -82,17 +82,15 @@ void sleep_for(const chrono::duration& rel_time); */ +#include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include <__debug> -#include <__functional_base> +#include <__functional/hash.h> #include <__mutex_base> #include <__thread/poll_with_backoff.h> #include <__thread/timed_backoff_policy.h> #include <__threading_support> #include <__utility/forward.h> -#include #include -#include #include #include #include @@ -100,16 +98,24 @@ void sleep_for(const chrono::duration& rel_time); #include #include +#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES +# include +# include +#endif + +// standard-mandated includes +#include + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header +# pragma GCC system_header #endif _LIBCPP_PUSH_MACROS #include <__undef_macros> #ifdef _LIBCPP_HAS_NO_THREADS -#error is not supported on this single threaded system -#else // !_LIBCPP_HAS_NO_THREADS +# error " is not supported since libc++ has been configured without support for threads." +#endif _LIBCPP_BEGIN_NAMESPACE_STD @@ -200,7 +206,7 @@ __thread_specific_ptr<_Tp>::set_pointer(pointer __p) template<> struct _LIBCPP_TEMPLATE_VIS hash<__thread_id> - : public unary_function<__thread_id, size_t> + : public __unary_function<__thread_id, size_t> { _LIBCPP_INLINE_VISIBILITY size_t operator()(__thread_id __v) const _NOEXCEPT @@ -229,11 +235,7 @@ public: thread() _NOEXCEPT : __t_(_LIBCPP_NULL_THREAD) {} #ifndef _LIBCPP_CXX03_LANG template ::type, thread>::value - >::type - > + class = __enable_if_t, thread>::value> > _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS explicit thread(_Fp&& __f, _Args&&... __args); #else // _LIBCPP_CXX03_LANG @@ -408,8 +410,6 @@ void yield() _NOEXCEPT {__libcpp_thread_yield();} _LIBCPP_END_NAMESPACE_STD -#endif // !_LIBCPP_HAS_NO_THREADS - _LIBCPP_POP_MACROS #endif // _LIBCPP_THREAD -- cgit v1.3