201 constexpr operator id_t()
const;
203static_assert(std::is_trivially_copyable_v<Thread_token> && std::is_trivially_destructible_v<Thread_token>,
204 "Thread_token must remain trivially copyable (at least to store it in raw memory as, say, a prefix) and "
205 "destructible (at least so that any C++ code -- even in a thread_local dtor during TL-deinit "
206 "at thread end -- can safely access a thread_local Thread_token).");
212constexpr Thread_token::operator
id_t()
const
Each object of this class stores (at construction) and returns (on demand) a numeric ID unique from a...
id_t unique_id() const
Raw unique ID identifying this object as well as any object of a derived type.
static id_t create_unique_id()
Short-hand for Unique_id_holder().unique_id(); useful when all you want is the unique integer itself.
Unique_id_holder()
Thread-safely construct an ID whose value is different from any other object of this class,...
const Unique_id_holder & operator=(const Unique_id_holder &) const
This assignment operator is a const no-op.
const id_t m_id
The ID. Note its constness alone forbids a classic assignment operator.
uint64_t id_t
Raw integer type to uniquely identify a thing. 64-bit width should make overflow extremely hard to re...
Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...
An integer-like, type-safe wrapper for the thread-token concept – see this_thread_unique_token(),...
id_t m_val
The underlying integer value; 0 <=> "none." Typically it is better to assign to *this rather than to ...
Unique_id_holder::id_t id_t
Short-hand for the underlying integer type.