23namespace threadschedule
36template <
typename T,
typename =
void>
43struct is_duration_impl<T, std::void_t<typename T::rep, typename T::period>> : std::true_type
48#if __cpp_concepts >= 201907L
56template <
typename F,
typename... Args>
67 { t.get_id() } -> std::convertible_to<std::thread::id>;
95 { t.size() } -> std::convertible_to<std::size_t>;
106template <
typename F,
typename... Args>
111constexpr bool ThreadIdentifiable = std::is_same_v<decltype(std::declval<T>().get_id()), std::thread::id>;
123constexpr bool CPUSetType = std::is_same_v<T, std::vector<int>> || std::is_same_v<T, std::set<int>>;
154#if __cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
173using enable_if_duration_t = std::enable_if_t<is_duration_impl<T>::value,
int>;
constexpr bool ThreadIdentifiable
Pre-C++20 fallback for ThreadIdentifiable (constexpr bool).
constexpr bool is_thread_like_v
Convenience variable template for is_thread_like.
constexpr bool ThreadCallable
Pre-C++20 fallback for ThreadCallable (constexpr bool).
constexpr bool PriorityType
Pre-C++20 fallback for PriorityType (constexpr bool).
std::enable_if_t< std::is_invocable_v< T >, int > enable_if_thread_callable_t
Helper type traits for thread operations.
constexpr bool CPUSetType
Pre-C++20 fallback for CPUSetType (constexpr bool).
constexpr bool Duration
Pre-C++20 fallback for Duration (constexpr bool).
SFINAE trait that detects std::chrono::duration types.
Type trait that identifies thread-like types.