A two-slot sink, for a filler that must call a route function expecting a slot container.
More...
#include <pike.hpp>
|
| 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.
|
| |
|
|
std::size_t | slots [2] {npos, npos} |
| | [0] is the match start, [1] the match end.
|
| |
template<typename State, bool StateBoundToProgram = false>
struct real::detail::pike_vm< State, StateBoundToProgram >::slot_pair
A two-slot sink, for a filler that must call a route function expecting a slot container.
Batched routes arm on slot_count == 2, so the span is every slot. Lets fill_inner_literal_spans reuse run_inner_literal verbatim without real::detail::small_vec (storage.hpp includes this header) or a 256-byte inline buffer on refill_batch's frame. Provides only what the route touches.
◆ assign()
template<typename State , bool StateBoundToProgram = false>
| constexpr void real::detail::pike_vm< State, StateBoundToProgram >::slot_pair::assign |
( |
std::size_t |
n, |
|
|
std::size_t |
value |
|
) |
| |
|
inlineconstexprnoexcept |
Sets both slots to value.
- Parameters
-
| [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). |
◆ operator[]() [1/2]
template<typename State , bool StateBoundToProgram = false>
| constexpr const std::size_t & real::detail::pike_vm< State, StateBoundToProgram >::slot_pair::operator[] |
( |
std::size_t |
i | ) |
const |
|
inlineconstexprnoexcept |
Slot access, const.
- Parameters
-
- Returns
- A const reference to that slot.
◆ operator[]() [2/2]
template<typename State , bool StateBoundToProgram = false>
| constexpr std::size_t & real::detail::pike_vm< State, StateBoundToProgram >::slot_pair::operator[] |
( |
std::size_t |
i | ) |
|
|
inlineconstexprnoexcept |
Slot access.
- Parameters
-
- Returns
- A reference to that slot.
◆ resize()
template<typename State , bool StateBoundToProgram = false>
No-op: the pair is already at its final size.
- Parameters
-
| [in] | n | The requested size; must be 2, and is ignored. |
◆ size()
template<typename State , bool StateBoundToProgram = false>
The slot count.
- Returns
- Always 2.
The documentation for this struct was generated from the following file: