commons 0.1.5
Header-only C++23 library of common/shared types for the C++ libraries
Loading...
Searching...
No Matches
comms::HasFlags< Categories > Class Template Reference

Implementation of IHasFlags: embeds a FlagSet and exposes it publicly. More...

#include <flag.hpp>

Inheritance diagram for comms::HasFlags< Categories >:
Collaboration diagram for comms::HasFlags< Categories >:

Public Member Functions

const FlagSetflags () const noexcept override
 The owned flag set (insertion order preserved).
 

Static Public Attributes

template<AnyFlag F>
static constexpr bool flag_allowed = AllowedFlag<F, Categories...>
 True when a flag in F's category is permitted by this set's constraint.
 

Detailed Description

template<typename... Categories>
class comms::HasFlags< Categories >

Implementation of IHasFlags: embeds a FlagSet and exposes it publicly.

Use it for a plain holder. List Categories... to record which categories the holder is meant for (surfaced via flag_allowed); leave it empty for any.

flags_ is protected so a deriving holder can populate it; outside code reads through the inherited flags() / has_flag().


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