|
commons 0.1.5
Header-only C++23 library of common/shared types for the C++ libraries
|
A type-erased, non-owning runtime handle to a flag. More...
#include <flag.hpp>

Static Public Member Functions | |
| template<AnyFlag F> | |
| static FlagRef | of () noexcept |
Build a FlagRef from a compile-time flag type, capturing its display metadata only if F is Displayable. | |
Public Attributes | |
| std::string_view | name |
Flag name; also the identity used for ==. | |
| std::string_view | category |
| Owning category name. | |
| const DisplayInfo * | display = nullptr |
| null when the flag is not Displayable | |
A type-erased, non-owning runtime handle to a flag.
name and category are views into the flag type's static NTTP-backed storage, valid for the program lifetime (the same guarantee IconifySet::set relies on). display points at the flag's DisplayInfo when it is Displayable, else is null.
Identity is the flag name: two FlagRefs compare equal iff their names match.