|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
The view is copied on every find_iter and count_matches call: a fixed per-call cost under any throughput row's noise floor, so its size is guarded by counting bytes, not by timing.
More...
Public Member Functions | |
| constexpr program_view | view () const |
| Returns a non-owning program_view over this program. | |
Public Attributes | |
| std::vector< instr > | code |
| The instruction stream (main program + lookaround sub-program regions). | |
| std::vector< char_class > | classes |
| Interned character classes. | |
| std::vector< named_group > | names |
| Named capture groups. | |
| std::vector< lookaround_sub > | lookarounds |
| Bounded lookaround sub-programs (regions of code). | |
| std::vector< cp_class > | cp_classes |
Match-time code-point classes (for klass_cp). | |
| std::vector< code_range > | cp_ranges |
Flat range buffer the cp_class slices index into. | |
| std::vector< instr > | prefix_code |
| IL: the inner-literal prefix sub-program (the part before the literal), for the reverse start-finder. Empty unless there is a required literal with a top-level prefix. Dynamic-only (not built during constant evaluation). | |
| std::vector< char_class > | prefix_classes |
| IL: classes for prefix_code. | |
| std::vector< cp_class > | prefix_cp_classes |
| IL: code-point classes (klass_cp) for prefix_code. | |
| std::vector< code_range > | prefix_cp_ranges |
| IL: flat range buffer for prefix_cp_classes. | |
| std::uint16_t | slot_count {2} |
2 * (capture groups + 1). | |
| bool | byte_mode {} |
| flags::bytes mode. | |
| bool | unicode_word {} |
\b \B \< \> use Unicode word-ness (text mode). | |
| pattern_hints | hints |
| Search-acceleration hints. | |
| std::int32_t | codepoint_mark_ascii {-1} |
| ASCII sub-class index of an emitted codepoint-class block (-1 = none). | |
| std::int32_t | codepoint_mark_offset {-1} |
| Where that block starts (program offset); the whole-pattern hint requires offset 1. | |
| std::int32_t | codepoint_mark_end {-1} |
| Program offset right after that block ends (-1 = none). | |
The view is copied on every find_iter and count_matches call: a fixed per-call cost under any throughput row's noise floor, so its size is guarded by counting bytes, not by timing.
Lower the ceiling when the view shrinks; raise it only with the reason written down. 64-bit only: std::span is two pointers, and a 32-bit CI leg exists.
Owning, heap-allocated program: the storage backing real::regex.
|
inlineconstexpr |
Returns a non-owning program_view over this program.