Storage policy backing real::regex: heap, sized once at run time.
More...
#include <storage.hpp>
|
| struct | state_type |
| | VM scratch state: SBO thread lists, working slots and eps stack. More...
|
| |
|
|
using | name_owner = name_context_box |
| | Name-resolution owner: empty unless the result outlives the regex it came from.
|
| |
|
using | slot_storage = small_vec< std::size_t, 32 > |
| | Capture-slot container: SBO, avoiding the heap for typical small group counts.
|
| |
|
|
std::string | pattern_text |
| | The original pattern text.
|
| |
|
dynamic_program | program |
| | The compiled program.
|
| |
|
flags | effective_flags {flags::none} |
| | Constructor flags merged with any leading (?imsxaU) group.
|
| |
|
detail::regex_immutables | immut_ {} |
| | Per-regex lazy-DFA/one-pass cache, built under program-identity invalidation (thread-safe) and shared by every search on this regex — not rebuilt per find_iter. mutable: a const regex fills it on first routed search. Copy/move leave a fresh unbuilt cache; assignment invalidates built_for so assign-onto-warmed rebuilds (see detail::regex_immutables).
|
| |
|
|
static constexpr bool | is_compile_time {} |
| | Selects the runtime constructor.
|
| |
Storage policy backing real::regex: heap, sized once at run time.
Match scratch uses small-buffer-optimized containers, so the common small-group match runs without a heap allocation.
◆ compile()
| static constexpr dynamic_storage real::detail::dynamic_storage::compile |
( |
std::string_view |
pattern, |
|
|
flags |
compile_flags |
|
) |
| |
|
inlinestaticconstexpr |
Parses and compiles pattern with flags compile_flags.
- Parameters
-
| [in] | pattern | The pattern text. |
| [in] | compile_flags | The requested flags (merged with a leading (?imsxaU) / (?flags-flags) group). |
- Returns
- A populated storage object.
- Exceptions
-
◆ compiled_flags()
| constexpr flags real::detail::dynamic_storage::compiled_flags |
( |
| ) |
const |
|
inlineconstexpr |
Returns the flag set in force: constructor flags, plus a leading global-flags group's additions, minus its -removal – see real::basic_regex::compile_flags.
- Returns
- The effective flag set.
◆ pattern()
| constexpr std::string_view real::detail::dynamic_storage::pattern |
( |
| ) |
const |
|
inlineconstexpr |
Returns the original pattern text.
- Returns
- The pattern, valid as long as this storage is alive.
◆ view()
| constexpr program_view real::detail::dynamic_storage::view |
( |
| ) |
const |
|
inlineconstexpr |
Returns a non-owning view of the compiled program.
- Note
- By value, deliberately, though
view() runs once per search(). A view materialised behind an identity guard enlarges every regex, and the guard must also test view_.immut != &immut_ (a move keeps program.code.data()); pattern_hints by pointer adds an indirection to every hint read. The prize is a few nanoseconds per search.
- Returns
- The view; valid as long as this storage is alive.
The documentation for this struct was generated from the following file: