6 requires std::is_enum_v<E>
15 &&
requires(E value) {
19 template <
typename Left,
typename Right>
21 && std::is_enum_v<Right>
22 && (std::is_scoped_enum_v<Left>
23 || std::is_scoped_enum_v<Right>
34 requires std::is_enum_v<E>
37 static_assert(
sizeof(std::underlying_type_t<E>) <=
sizeof(uint64_t));
54 requires std::is_enum_v<E>
55 [[nodiscard]] std::optional<E>
selection(
size_t index)
const
76 const auto offset = std::min(count,
size());
98 static const char identity {};
106template <
typename Left,
typename Right>
static const void * enum_identity()
ComputationSignature()=default
ComputationSignature(E selection)
friend ComputationSignature operator|(ComputationSignature left, const ComputationSignature &right)
std::optional< E > selection(size_t index) const
Read a selection when its enum type matches E.
bool starts_with(const ComputationSignature &prefix) const
Whether the signature begins with all selections in prefix.
ComputationSignature at(size_t index) const
The single selection at this stage, retaining its enum identity.
ComputationSignature after(size_t count) const
Remaining selections after a resolved prefix.
std::vector< Selection > m_selections
bool operator==(const ComputationSignature &) const =default
Ordered operation selections, preserving each enum's type and value.
ComputationSignature operator|(Left left, Right right)
Compose enum selections in execution order without combining their bits.
bool operator==(const Selection &) const =default