|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
A two-slot sink, for a filler that must call a route function expecting a slot container. More...
#include <pike.hpp>
Public Member Functions | |
| constexpr void | assign (std::size_t n, std::size_t value) noexcept |
Sets both slots to value. | |
| constexpr void | resize (std::size_t n) noexcept |
| No-op: the pair is already at its final size. | |
| constexpr std::size_t | size () const noexcept |
| The slot count. | |
| constexpr std::size_t & | operator[] (std::size_t i) noexcept |
| Slot access. | |
| constexpr const std::size_t & | operator[] (std::size_t i) const noexcept |
| Slot access, const. | |
Public Attributes | |
| std::size_t | slots [2] {npos, npos} |
[0] is the match start, [1] the match end. | |
A two-slot sink, for a filler that must call a route function expecting a slot container.
The batched routes all arm on slot_count == 2, so the whole-match span is every slot the program has. This exists so fill_inner_literal_spans can reuse run_inner_literal verbatim – one mechanism rather than a copy of its confirm logic – without pulling real::detail::small_vec into this header, which storage.hpp cannot do (it includes this one), and without putting a 256-byte inline buffer on refill_batch's frame.
It satisfies exactly what the route touches: assign, resize, size and indexing.
|
inlineconstexprnoexcept |
Sets both slots to value.
| [in] | n | The route's slot_count; must be 2, and is ignored. |
| [in] | value | The value written to both slots (the route passes real::npos). |
|
inlineconstexprnoexcept |
Slot access, const.
| [in] | i | Slot index, 0 or 1. |
|
inlineconstexprnoexcept |
Slot access.
| [in] | i | Slot index, 0 or 1. |
|
inlineconstexprnoexcept |
No-op: the pair is already at its final size.
| [in] | n | The requested size; must be 2, and is ignored. |
|
inlineconstexprnoexcept |
The slot count.