31#ifdef USE_STD_CONCEPTS
34 template<
typename T,
typename = std::enable_if_t<JobType<T>>>
39 std::underlying_type_t<T>,
42 static constexpr bool is_enum = std::is_enum_v<T>;
45 static constexpr bool is_signed = std::is_signed_v<underlying_type>;
63 return static_cast<T
>(value);
77 return traits::has_ordering;
85#ifdef USE_STD_CONCEPTS
88 template<
typename T,
typename = std::enable_if_t<JobType<T>>>
94 return traits::to_underlying(lhs) < traits::to_underlying(rhs);
100#ifdef USE_STD_CONCEPTS
104 template<
typename T,
typename = std::enable_if_t<JobType<T>>>
constexpr bool can_compare_priority()
Helper to determine if a type can be used as a job priority.
typename job_type_traits< T, void >::underlying_type job_underlying_t
Type alias for job type conversion.
constexpr bool higher_priority(T lhs, T rhs) noexcept
Compile-time priority comparison.
Type traits for job types.
static constexpr bool is_signed
static constexpr T from_underlying(underlying_type value) noexcept
Creates job type from underlying representation.
static constexpr bool is_enum
std::conditional_t< std::is_enum_v< T >, std::underlying_type_t< T >, T > underlying_type
static constexpr underlying_type to_underlying(T value) noexcept
Converts job type to its underlying representation.
static constexpr bool is_integral
static constexpr bool has_ordering
C++20 Concepts for thread_system.