Added bool conversion for Name.
This commit is contained in:
parent
faf4489b92
commit
de07cf91bc
@ -37,6 +37,8 @@ public:
|
|||||||
|
|
||||||
Name& operator=(const Name&) = default;
|
Name& operator=(const Name&) = default;
|
||||||
auto operator<=>(const Name&) const = default;
|
auto operator<=>(const Name&) const = default;
|
||||||
|
constexpr operator bool() const noexcept { return id_ != std::numeric_limits<std::size_t>::max(); }
|
||||||
|
constexpr bool operator!() const noexcept { return !static_cast<bool>(*this); }
|
||||||
|
|
||||||
[[nodiscard]] std::string_view stringView() const;
|
[[nodiscard]] std::string_view stringView() const;
|
||||||
[[nodiscard]] const char* c_str() const {
|
[[nodiscard]] const char* c_str() const {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user