HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
v1::tagged_id< Derived, T, Empty > Class Template Reference

#include <hikogui/utility/tagged_id.hpp>

Public Types

using derived_type = Derived
using value_type = T

Public Member Functions

constexpr tagged_id (tagged_id const &other) noexcept=default
constexpr tagged_id (tagged_id &&other) noexcept=default
constexpr tagged_id & operator= (tagged_id const &other) noexcept=default
constexpr tagged_id & operator= (tagged_id &&other) noexcept=default
constexpr tagged_id (std::nullopt_t) noexcept
constexpr tagged_id (value_type rhs)
constexpr tagged_id & operator= (value_type rhs)
constexpr tagged_id & operator= (std::nullopt_t) noexcept
constexpr bool empty () const noexcept
constexpr operator bool () const noexcept
constexpr value_type value () const
constexpr operator value_type () const
constexpr value_type operator* () const

Static Public Member Functions

static tagged_id make ()
 Make a new unique identifier.

Static Public Attributes

static constexpr value_type empty_value = Empty

Friends

constexpr friend auto operator<=> (tagged_id const &, tagged_id const &) noexcept=default
constexpr friend bool operator== (tagged_id const &, tagged_id const &) noexcept=default

Detailed Description

template<typename Derived, std::unsigned_integral T, T Empty>
class v1::tagged_id< Derived, T, Empty >

A tagged identifier.

Template Parameters
DerivedThe derived class.
TThe unsigned integer type used as the underlying type.
EmptyThe underlying value the means empty. Often either zero or std::numeric_limits<T>::max().

Member Function Documentation

◆ make()

template<typename Derived, std::unsigned_integral T, T Empty>
tagged_id v1::tagged_id< Derived, T, Empty >::make ( )
inlinestaticnodiscard

Make a new unique identifier.


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