REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
real::detail::class_ref Struct Reference

A typed reference into a possessive-loop body's operand space. More...

Public Member Functions

constexpr bool armed () const noexcept
 Whether this reference names anything at all.
 

Public Attributes

class_kind kind {class_kind::none}
 Which table REAL refers to; none means unarmed.
 
std::uint16_t index {}
 classes[]/cp_classes[] index (kind == klass/klass_cp), or the literal byte value 0-255 (kind == byte).
 

Friends

constexpr bool operator== (const class_ref &, const class_ref &) noexcept=default
 Equality, comparing kind first so two different tables' indices never collide.
 

Detailed Description

A typed reference into a possessive-loop body's operand space.

Typed so equality compares kind before the index: with bare indices, index 0 of two different tables would compare equal and [abc].*+ match unconditionally.

Member Function Documentation

◆ armed()

constexpr bool real::detail::class_ref::armed ( ) const
inlineconstexprnoexcept

Whether this reference names anything at all.

Returns
False while kind is class_kind::none.

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