REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
real::detail::cp_hi_table Struct Reference

Unicode-property sparse 2-stage membership for code points > U+07FF (page = cp>>8 → 256-bit block). Thread-local heap cache only — basic_pike_state's size is unchanged, which is what keeps the ASCII class loop clear of it. More...

#include <pike.hpp>

Public Member Functions

bool contains (char32_t cp) const noexcept
 Two-stage membership probe: page index, then bit test inside that page's 256-bit block.
 

Public Attributes

std::vector< std::uint16_t > page_of
 page_of[cp>>8] → index into blocks, or empty.
 
std::vector< std::array< std::uint8_t, 32 > > blocks
 Non-empty 256-bit pages only.
 

Static Public Attributes

static constexpr std::uint16_t empty {0xFFFFU}
 page_of sentinel: no members in that page.
 

Detailed Description

Unicode-property sparse 2-stage membership for code points > U+07FF (page = cp>>8 → 256-bit block). Thread-local heap cache only — basic_pike_state's size is unchanged, which is what keeps the ASCII class loop clear of it.

Member Function Documentation

◆ contains()

bool real::detail::cp_hi_table::contains ( char32_t  cp) const
inlinenoexcept

Two-stage membership probe: page index, then bit test inside that page's 256-bit block.

Parameters
[in]cpCode point to test.
Returns
True when cp is a member; false for any code point above the built range.

The documentation for this struct was generated from the following file: