ThreadSchedule 4.1.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::thread_id Class Reference

#include <thread_id.hpp>

Public Member Functions

constexpr thread_id (std::int64_t value)
 Construct and validate a thread id.

Static Public Member Functions

static auto create (std::int64_t value) noexcept -> result< thread_id >
 Construct a thread id without exceptions.

Friends

struct detail::thread_id_access
constexpr auto operator== (thread_id lhs, thread_id rhs) noexcept -> bool
constexpr auto operator!= (thread_id lhs, thread_id rhs) noexcept -> bool
constexpr auto operator< (thread_id lhs, thread_id rhs) noexcept -> bool

Detailed Description

Definition at line 21 of file thread_id.hpp.

Constructor & Destructor Documentation

◆ thread_id()

threadschedule::thread_id::thread_id ( std::int64_t value)
inlineexplicitconstexpr

Construct and validate a thread id.

Parameters
valuePositive numeric thread id.
Exceptions
std::invalid_argumentif value is not positive.

Definition at line 29 of file thread_id.hpp.

Referenced by create(), operator!=, operator<, and operator==.

Member Function Documentation

◆ create()

auto threadschedule::thread_id::create ( std::int64_t value) ->result< thread_id >
inlinestaticnodiscardnoexcept

Construct a thread id without exceptions.

Parameters
valuePositive numeric thread id.
Returns
A valid thread_id or errc::invalid_argument.

Definition at line 37 of file thread_id.hpp.

References thread_id(), and threadschedule::unexpected().

◆ detail::thread_id_access

friend struct detail::thread_id_access
friend

Definition at line 61 of file thread_id.hpp.

◆ operator!=

auto operator!= ( thread_id lhs,
thread_id rhs )->bool
friend

Definition at line 50 of file thread_id.hpp.

References thread_id().

◆ operator<

auto operator< ( thread_id lhs,
thread_id rhs )->bool
friend

Definition at line 54 of file thread_id.hpp.

References thread_id().

◆ operator==

auto operator== ( thread_id lhs,
thread_id rhs )->bool
friend

Definition at line 45 of file thread_id.hpp.

References thread_id().


The documentation for this class was generated from the following file: