|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
Optional route-attribution counters — the profiling substrate. More...
#include <cstdint>#include <type_traits>Namespaces | |
| namespace | real |
| REAL's public API: real::regex, real::static_regex, real::flags and the match/iterator types built on them. | |
| namespace | real::detail |
| DFA construction internals: subset construction over a flattened NFA. Not a stable API. | |
| namespace | real::detail::prof |
| Opt-in route/work counters, compiled out unless the profiling build flag is set. | |
Enumerations | |
| enum class | real::detail::prof::route : std::uint8_t { class_loop = 0 , cp_class_loop , exact_literal , inner_literal , fixed_shape , real::detail::prof::fixed_shape_pair , codepoint_class , alternation , real::detail::prof::aho_corasick , onepass_full , onepass_window , real::detail::prof::lazy_dfa_anchored , real::detail::prof::lazy_dfa_fwd_rev , general_full , general_window , trailing_la , real::detail::prof::possessive_byte_loop , real::detail::prof::possessive_class_loop , real::detail::prof::possessive_cp_class_loop , real::detail::prof::possessive_delimited , count_ } |
| Named once-per-dispatch routes (Tier 1). Always visible so tick call sites compile OFF. More... | |
| enum class | real::detail::prof::event : std::uint8_t { first_byte_skip = 0 , cascade , rare_byte , memmem , real::detail::prof::wb_b1_drop , real::detail::prof::wb_b2_wrap , il_abandoned , real::detail::prof::pool_incref , real::detail::prof::pool_decref , real::detail::prof::pool_cow_write , count_ } |
| Secondary events: prefilter work, word-boundary handling, abandons, capture-pool traffic. More... | |
Functions | |
| constexpr void | real::detail::prof::tick_route (route r) noexcept |
Bill one dispatch to route r. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | real::detail::prof::tick_event (event e) noexcept |
Bill one occurrence of e. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | real::detail::prof::tick_thread_count (std::size_t n) noexcept |
Bill one step() carrying n live threads. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | real::detail::prof::tick_prefilter_candidate () noexcept |
Bill one candidate a prefilter produced. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | real::detail::prof::tick_prefilter_rejected () noexcept |
| Bill one prefilter candidate REJECTED by confirmation. See tick_prefilter_candidate for the scope these two share. | |
| constexpr void | real::detail::prof::tick_bytes (std::uint64_t n) noexcept |
Bill n scanned bytes. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | real::detail::prof::tick_run_len (std::size_t n) noexcept |
Record a run of n accepted units. Erased entirely unless REAL_PROFILE is defined. | |
Optional route-attribution counters — the profiling substrate.
Codegen-invisible when OFF (default): tick helpers are empty always_inline functions — no branch, no thread_local touch, no object-layout change. Counters and harness helpers (tls / reset / snapshot / name tables) exist only under -DREAL_PROFILE so coverage builds never see dead instrumented paths.
Protocol: ns/B is always measured on a profile-OFF build; route counters come from a profile-ON build of the same (pattern, corpus, surface). Never mix.
Constexpr-safe when ON: increments run only outside constant evaluation (guarded so static_regex stays pure).