19 constexpr inline bool Empty()
const
21 return std::ranges::all_of(*
this, [](uint8_t b) {
return b == 0; });
37template <
typename Tag>
42 std::ranges::fill(*
this, 0);
50 constexpr Label(
const char (&label)[5])
52 std::copy(label, label + this->size(), this->begin());
59 constexpr Label(
const uint8_t (&label)[4])
61 std::copy(label, label + this->size(), this->begin());
Base for a four character label/tag/id.
constexpr bool Empty() const
Check whether the label is empty.
std::string AsString() const
Get the label as a std::string.
constexpr Label()
Create an empty label, i.e.
constexpr Label(const uint8_t(&label)[4])
Create a label with the given 4 bytes.
constexpr std::strong_ordering operator<=>(const Label< Tag > &other) const =default
Default spaceship operator.
constexpr Label(const char(&label)[5])
Create a label with the given 4 letter character string.