FE 0.15.0
A C++23 toolkit for writing compiler/interpreter frontends.
Loading...
Searching...
No Matches
fe Namespace Reference

Namespaces

namespace  dl
namespace  lct
namespace  sys
namespace  term
 Lightweight stream-based terminal colors for diagnostics and CLI output.
namespace  utf8
 UTF-8 helpers for decoding byte streams, encoding char32_t values, and running ASCII-style character classification on char32_t.

Classes

class  Arena
 An arena pre-allocates so-called pages of size Arena::page_size_. More...
struct  basic_ostream_formatter
 Make types that support ostream operators available for std::format. More...
class  Bitset
 A dynamically growing set of bits with small storage optimization. More...
class  Cite
 A borrowed fragment whose backticks stay markup; format_cite escapes every other argument. More...
class  Cited
 An owning message fragment that spells `citations` of its own; what format_cite yields. More...
class  Cli
 A small command-line parser for a single command - no subcommands. More...
class  CodeDiag
 The Diag a Driver installs by default: colors a `citation` and drops its backticks - or keeps them verbatim without color; \` is a literal backtick and \\ a literal backslash. More...
struct  Dbg
 The debug info of an entity: where it came from and what it was called. More...
class  DbgKey
 Opaque handle to a Dbg interned in a Driver; see Driver::dbg. More...
class  Diag
 How a diagnostic lays out - and how much of it an Error keeps. More...
struct  Driver
 Use/derive from this class for "global" variables that you need all over the place. More...
class  Error
 Collects diagnostics and hands each to the Diag that lays it out. More...
struct  is_bit_enum
class  Join
 Join elements of range with sep. More...
class  Lexer
 The blueprint for a lexer with a buffer of K tokens to peek into the future (Lexer::ahead). More...
struct  Loc
 Location within a Src: the half-open byte range [Loc::begin, Loc::end). More...
class  Log
 Facility to log what you are doing. More...
class  Parser
 The blueprint for a recursive descent/ ascent parser using a K lookahead of Tokens. More...
struct  PathHash
 Hashes a std::filesystem::path - consistent with its operator==, which compares lexically. More...
class  Patricia
 Hash-consed, immutable sets of D*, ordered by an unsigned id the elements carry themselves. More...
struct  Pos
 Byte offset into a Src; pass around as value. More...
class  Profiler
 Records wall-clock timings for (possibly nested) named Profiler::Spans and reports them in various formats. More...
class  Restore
 RAII guard that restores a value at the end of the scope. More...
class  Restore< T, nullptr, nullptr >
 Restores ref to its current value at the end of the scope. More...
class  Ring
 A ring buffer with N elements. More...
class  Ring< T, 1 >
 Specialization if N == 1 - doesn't need a ring. More...
class  Ring< T, 2 >
 Specialization if N == 2; doesn't need a ring, we just copy. More...
class  RuntimeCast
 Inherit from this class using CRTP, for some nice dynamic_cast-style wrappers. More...
struct  Snippet
 The underlined source excerpt that goes below a diagnostic. More...
class  Span
 This is a thin wrapper for std::span<T, N> with the following additional features: More...
class  Src
 The content of one source file together with the offsets its rows start at. More...
class  SrcMap
 Interns the text - and the std::filesystem::path - of every file a Loc may point into. More...
class  StreamFn
 Wrap a callable f(std::ostream&) -> std::ostream& so it streams via operator<< and std::format. More...
class  Sym
 A Symbol just wraps a pointer to Sym::String, so pass Sym itself around as value. More...
class  SymPool
 Hash set where all strings - wrapped in Symbol - live in. More...
class  SymTab
 A fixed-capacity Symbol -> V map for a closed set of Size entries: filled once, then only looked up - a Lexer's reserved words, say. More...
class  Tab
 Keeps track of indentation level during output. More...
class  Vector
 This is a thin wrapper for absl::InlinedVector<T, N, A> which is a drop-in replacement for std::vector<T, A>. More...
class  VLA
 CRTP base that gives Self one VLA per element type in Self::VLA_Types directly behind it in memory - the C flexible array member, generalized to several arrays of different type. More...
class  Worklist
 A worklist that pushes each element at most once. More...
class  XTrie
 Hash-consed sets of D*. More...

Concepts

concept  BitEnum
concept  Formattable
concept  Nodeable
concept  NodeSetable
 Like Nodeable, but for a class that spans a set of node kinds instead of a single one.
concept  Queuelike
 Something which behaves like std::queue.
concept  Stacklike
 Something which behaves like std::stack or std::priority_queue.
concept  Vectorlike
 Something which behaves like std::vector or std::array.
concept  VLAed
 Does T carry VLAs?

Typedefs

using ostream_formatter = basic_ostream_formatter<char>
template<class T, size_t N = std::dynamic_extent>
using View = Span<const T, N>
 Read-only Span; use Span itself, if you want to write through its elements.
template<class V>
using PathMap = std::unordered_map<std::filesystem::path, V, PathHash>
 Maps a std::filesystem::path to V.
template<class Set>
using BFSWorklist = Worklist<Set, std::queue<detail::WorklistElem<Set>>>
template<class Set>
using DFSWorklist = Worklist<Set, std::stack<detail::WorklistElem<Set>>>
template<class... Args>
using cite_string
 <
DbgMap/DbgSet
template<class V>
using DbgMap = std::unordered_map<Dbg, V, Dbg::Hash, Dbg::Eq>
using DbgSet = std::unordered_set<Dbg, Dbg::Hash, Dbg::Eq>
SymMap/SymSet

Set/Map is keyed by pointer - which is hashed in SymPool.

template<class V>
using SymMap = std::unordered_map<Sym, V, Sym::Hash, Sym::Eq>
using SymSet = std::unordered_set<Sym, Sym::Hash, Sym::Eq>

Functions

void unreachable ()
void breakpoint ()
 Raise a breakpoint in the debugger.
FE_API std::ostream & operator<< (std::ostream &, Diag::Tag)
template<fe::BitEnum E>
constexpr bool has_flag (E value, E flag) noexcept
template<class F>
 StreamFn (F) -> StreamFn< F >
template<class R>
 Join (R &&, std::string_view=", ") -> Join< R >
template<class T>
 Restore (T &, T) -> Restore< T >
 The primary template has no two-argument constructor to deduce this one from.
template<size_t I, class T, size_t N>
requires (N != std::dynamic_extent)
constexpr decltype(auto) get (Span< T, N > span) noexcept
template<class T = std::logic_error, class... Args>
void throwf (cite_string< Args... > fmt, Args &&... args)
 <
template<class... Args>
Cited format_cite (cite_string< Args... > fmt, Args &&... args)
 <
Utility Functions
template<class D, class S>
requires (std::is_trivially_copyable_v<S> && std::is_trivially_copyable_v<D>)
constexpr D bitcast_resize (const S &src) noexcept
 A bitcast from src of type S to D, supporting different sizes.
constexpr std::uint64_t pad (std::uint64_t offset, std::uint64_t align) noexcept
 Rounds offset up to the next multiple of align.
constexpr bool is_aligned (std::uint64_t offset, std::uint64_t align) noexcept
Algorithms
template<std::random_access_iterator I, class T, class L = std::less<>>
constexpr I binary_find (I begin, I end, const T &val, L lt={})
template<std::ranges::random_access_range R, class T, class L = std::less<>>
requires std::ranges::common_range<R>
constexpr auto binary_find (R &&r, const T &val, L lt={})
void find_and_replace (std::string &str, std::string_view what, std::string_view repl)
 Replaces all occurrences of what with repl.
Helpers for Containers
template<Stacklike S>
S::value_type pop (S &s)
template<Queuelike Q>
Q::value_type pop (Q &q)
template<class C, class K>
auto lookup (C &container, const K &key)
 Yields pointer to element (or the element itself if it is already a pointer), if found and nullptr otherwise.
decltype(auto) assert_lookup (auto &container, const auto &key)
 Looks up key in container, asserts that it exists, and returns a reference to the mapped value.
auto assert_emplace (auto &container, auto &&... args)
 Invokes emplace on container, asserts that insertion actually happened, and returns the iterator.
Bit operations for enum classs

Provides all kind of bit and comparison operators for an enum class E.

Use like this:

enum class MyEnum : unsigned {
A = 1 << 0,
B = 1 << 1,
C = 1 << 2,
};
template<> struct fe::is_bit_enum<MyEnum> : std::true_type {};
template<fe::BitEnum E>
constexpr auto to_underlying (E e) noexcept
Bit Mixers

These finalizers scramble a single word.

They are bijective, i.e., they don't introduce any collisions on their own - they merely spread the input bits.

constexpr uint32_t murmur3 (uint32_t h) noexcept
 MurmurHash3's 32-bit finalizer fmix32.
constexpr uint64_t splitmix64 (uint64_t h) noexcept
 SplitMix64's 64-bit finalizer.
constexpr size_t hash (size_t h) noexcept
 Mixes h with murmur3 or splitmix64 - whichever matches sizeof(size_t).
Deduction Guides
template<class I, class E>
 Span (I, E) -> Span< std::remove_reference_t< std::iter_reference_t< I > > >
template<class T, size_t N>
 Span (T(&)[N]) -> Span< T, N >
template<class T, size_t N>
 Span (std::array< T, N > &) -> Span< T, N >
template<class T, size_t N>
 Span (const std::array< T, N > &) -> Span< const T, N >
template<class R>
 Span (R &&) -> Span< std::remove_reference_t< std::ranges::range_reference_t< R > > >
template<Vectorlike Vec>
 Span (Vec &) -> Span< typename Vec::value_type, std::dynamic_extent >
template<Vectorlike Vec>
 Span (const Vec &) -> Span< const typename Vec::value_type, std::dynamic_extent >
template<class I, class A = std::allocator<typename std::iterator_traits<I>::value_type>>
 Vector (I, I, A=A()) -> Vector< typename std::iterator_traits< I >::value_type, Default_Inlined_Size< typename std::iterator_traits< I >::value_type >, A >
erase
template<class T, size_t N, class A, class U>
Vector< T, N, A >::size_type erase (Vector< T, N, A > &c, const U &value)
template<class T, size_t N, class A, class Pred>
Vector< T, N, A >::size_type erase_if (Vector< T, N, A > &c, Pred pred)

Variables

template<class T>
static constexpr size_t Default_Inlined_Size = std::max((size_t)1, 4 * sizeof(size_t) / sizeof(T))
 Use up to 4 words (i.e., 4 * sizeof(size_t)) of inlined storage, rounded up.

FNV-1 Hash

See Wikipedia.

Use hash_begin to seed a hash chain and hash_combine to fold in one value after another:

auto h = fe::hash_begin(x);
for (auto elem : elems) h = fe::hash_combine(h, elem);
constexpr size_t hash_begin() noexcept
Seeds a hash chain with the FNV-1 offset basis.
Definition hash.h:69
constexpr size_t hash_combine(size_t seed, T v) noexcept
Mixes v into seed word-wise, reusing the FNV-1 prime as multiplier.
Definition hash.h:73
Note
These hashes are not stable: they differ between 32- and 64-bit builds and may change between fe releases. Never serialize them and never rely on the iteration order they induce.
constexpr size_t fnv1_offset = sizeof(size_t) == 4 ? size_t(UINT32_C(2166136261)) : size_t(UINT64_C(14695981039346656037))
 FNV-1 magic numbers for sizeof(size_t).
constexpr size_t fnv1_prime = sizeof(size_t) == 4 ? size_t(UINT32_C( 16777619)) : size_t(UINT64_C( 1099511628211))
constexpr size_t hash_begin () noexcept
 Seeds a hash chain with the FNV-1 offset basis.
template<std::integral T>
constexpr size_t hash_combine (size_t seed, T v) noexcept
 Mixes v into seed word-wise, reusing the FNV-1 prime as multiplier.
template<std::integral T>
constexpr size_t hash_begin (T v) noexcept
 Shorthand for hash_combine(hash_begin(), v).
constexpr size_t hash_combine (size_t seed, std::string_view sv) noexcept
 Mixes the bytes of sv into seed a machine word at a time.
constexpr size_t hash_begin (std::string_view sv) noexcept
 Shorthand for hash_combine(hash_begin(), sv).

Typedef Documentation

◆ BFSWorklist

template<class Set>
using fe::BFSWorklist = Worklist<Set, std::queue<detail::WorklistElem<Set>>>

Definition at line 78 of file worklist.h.

◆ cite_string

template<class... Args>
using fe::term::cite_string

<

A borrowed fragment whose backticks stay markup; format_cite escapes every other argument.

A literal and a Cited convert implicitly - both are text someone wrote as markup. Runtime text has to say so: spell it Cite(s), so data never becomes markup by accident. A const char* - a ternary of two literals, say - counts as runtime text and needs Cite(s) too.

Warning
Borrows its text like a std::string_view does - a Cited outlives the expression, a Cite does not.

Definition at line 242 of file term.h.

◆ DbgMap

template<class V>
using fe::DbgMap = std::unordered_map<Dbg, V, Dbg::Hash, Dbg::Eq>

Definition at line 92 of file dbg.h.

◆ DbgSet

using fe::DbgSet = std::unordered_set<Dbg, Dbg::Hash, Dbg::Eq>

Definition at line 93 of file dbg.h.

◆ DFSWorklist

template<class Set>
using fe::DFSWorklist = Worklist<Set, std::stack<detail::WorklistElem<Set>>>

Definition at line 80 of file worklist.h.

◆ ostream_formatter

Definition at line 61 of file format.h.

◆ PathMap

template<class V>
using fe::PathMap = std::unordered_map<std::filesystem::path, V, PathHash>

Maps a std::filesystem::path to V.

Warning
Node-based on purpose: fe::SrcMap stores its Srcs in here and a Loc points to one, so the values must never move.

Definition at line 35 of file src.h.

◆ SymMap

template<class V>
using fe::SymMap = std::unordered_map<Sym, V, Sym::Hash, Sym::Eq>

Definition at line 233 of file sym.h.

◆ SymSet

using fe::SymSet = std::unordered_set<Sym, Sym::Hash, Sym::Eq>

Definition at line 234 of file sym.h.

◆ View

template<class T, size_t N = std::dynamic_extent>
using fe::View = Span<const T, N>

Read-only Span; use Span itself, if you want to write through its elements.

Definition at line 107 of file span.h.

Function Documentation

◆ assert_emplace()

auto fe::assert_emplace ( auto & container,
auto &&... args )

Invokes emplace on container, asserts that insertion actually happened, and returns the iterator.

Definition at line 61 of file container.h.

References assert_emplace(), and assert_unused.

Referenced by assert_emplace().

◆ assert_lookup()

decltype(auto) fe::assert_lookup ( auto & container,
const auto & key )
nodiscard

Looks up key in container, asserts that it exists, and returns a reference to the mapped value.

Definition at line 54 of file container.h.

References assert_lookup().

Referenced by assert_lookup().

◆ binary_find() [1/2]

template<std::random_access_iterator I, class T, class L = std::less<>>
I fe::binary_find ( I begin,
I end,
const T & val,
L lt = {} )
nodiscardconstexpr

Definition at line 59 of file algo.h.

References binary_find().

Referenced by binary_find(), and binary_find().

◆ binary_find() [2/2]

template<std::ranges::random_access_range R, class T, class L = std::less<>>
requires std::ranges::common_range<R>
auto fe::binary_find ( R && r,
const T & val,
L lt = {} )
nodiscardconstexpr

Definition at line 69 of file algo.h.

References binary_find().

◆ bitcast_resize()

template<class D, class S>
requires (std::is_trivially_copyable_v<S> && std::is_trivially_copyable_v<D>)
D fe::bitcast_resize ( const S & src)
constexprnoexcept

A bitcast from src of type S to D, supporting different sizes.

Keeps the low-order bytes on either endianness: a wider D zero-fills the rest, a narrower one truncates.

Definition at line 26 of file algo.h.

References bitcast_resize().

Referenced by bitcast_resize().

◆ breakpoint()

void fe::breakpoint ( )
inline

Raise a breakpoint in the debugger.

Definition at line 30 of file assert.h.

References breakpoint().

Referenced by breakpoint(), and fe::Log::level2color().

◆ erase()

template<class T, size_t N, class A, class U>
Vector< T, N, A >::size_type fe::erase ( Vector< T, N, A > & c,
const U & value )

Definition at line 102 of file vector.h.

References erase().

Referenced by erase().

◆ erase_if()

template<class T, size_t N, class A, class Pred>
Vector< T, N, A >::size_type fe::erase_if ( Vector< T, N, A > & c,
Pred pred )

Definition at line 110 of file vector.h.

References erase_if().

Referenced by erase_if().

◆ find_and_replace()

void fe::find_and_replace ( std::string & str,
std::string_view what,
std::string_view repl )
inline

Replaces all occurrences of what with repl.

Definition at line 74 of file algo.h.

References find_and_replace().

Referenced by find_and_replace().

◆ format_cite()

template<class... Args>
Cited fe::term::format_cite ( cite_string< Args... > fmt,
Args &&... args )

<

An owning message fragment that spells `citations` of its own; what format_cite yields.

Return this from a helper that assembles a fragment, and it stays valid wherever a Cite may go.

Definition at line 247 of file term.h.

Referenced by fe::Parser< Tok, Tag, K, S >::expect(), fe::RuntimeCast< B >::expect(), and fe::Parser< Tok, Tag, K, S >::tag2str_().

◆ get()

template<size_t I, class T, size_t N>
requires (N != std::dynamic_extent)
decltype(auto) fe::get ( Span< T, N > span)
constexprnoexcept

Definition at line 123 of file span.h.

References get().

Referenced by get().

◆ has_flag()

template<fe::BitEnum E>
bool fe::has_flag ( E value,
E flag )
constexprnoexcept
Note
flag must have at least one bit set; has_flag(value, E{}) would be vacuously true. flag is a runtime value, so this is a runtime assert rather than a static_assert (in a constexpr evaluation a zero flag turns it into a compile-time error all the same).

Definition at line 47 of file enum.h.

References has_flag(), and to_underlying().

Referenced by has_flag().

◆ hash()

size_t fe::hash ( size_t h)
constexprnoexcept

Mixes h with murmur3 or splitmix64 - whichever matches sizeof(size_t).

Definition at line 42 of file hash.h.

References hash(), murmur3(), and splitmix64().

Referenced by hash(), hash_combine(), hash_combine(), and fe::Sym::Hash::operator()().

◆ hash_begin() [1/3]

size_t fe::hash_begin ( )
constexprnoexcept

Seeds a hash chain with the FNV-1 offset basis.

Definition at line 69 of file hash.h.

References fnv1_offset, and hash_begin().

Referenced by fe::Bitset::hash(), hash_begin(), hash_begin(), hash_begin(), fe::Dbg::Hash::operator()(), fe::Sym::String::Hash::operator()(), and fe::XTrie< D, K, N >::Data::Hash::operator()().

◆ hash_begin() [2/3]

size_t fe::hash_begin ( std::string_view sv)
constexprnoexcept

Shorthand for hash_combine(hash_begin(), sv).

Definition at line 103 of file hash.h.

References hash_begin(), and hash_combine().

◆ hash_begin() [3/3]

template<std::integral T>
size_t fe::hash_begin ( T v)
constexprnoexcept

Shorthand for hash_combine(hash_begin(), v).

Definition at line 79 of file hash.h.

References hash_begin(), and hash_combine().

◆ hash_combine() [1/2]

size_t fe::hash_combine ( size_t seed,
std::string_view sv )
constexprnoexcept

Mixes the bytes of sv into seed a machine word at a time.

Definition at line 84 of file hash.h.

References fnv1_prime, hash(), and hash_combine().

◆ hash_combine() [2/2]

template<std::integral T>
size_t fe::hash_combine ( size_t seed,
T v )
constexprnoexcept

Mixes v into seed word-wise, reusing the FNV-1 prime as multiplier.

Definition at line 73 of file hash.h.

References fnv1_prime, hash(), and hash_combine().

Referenced by fe::Bitset::hash(), hash_begin(), hash_begin(), hash_combine(), hash_combine(), fe::Dbg::Hash::operator()(), and fe::XTrie< D, K, N >::Data::Hash::operator()().

◆ is_aligned()

bool fe::is_aligned ( std::uint64_t offset,
std::uint64_t align )
nodiscardconstexprnoexcept

Definition at line 50 of file algo.h.

References is_aligned().

Referenced by is_aligned().

◆ Join()

template<class R>
fe::Join ( R && ,
std::string_view = ", " ) -> Join< R >

◆ lookup()

template<class C, class K>
auto fe::lookup ( C & container,
const K & key )
nodiscard

Yields pointer to element (or the element itself if it is already a pointer), if found and nullptr otherwise.

Constness of container carries over to the result.

Warning
If the element is not already a pointer, this lookup will simply take the address of this element. This means that, e.g., a rehash of an absl::flat_hash_map will invalidate this pointer.

Definition at line 45 of file container.h.

References lookup().

Referenced by lookup().

◆ murmur3()

uint32_t fe::murmur3 ( uint32_t h)
constexprnoexcept

MurmurHash3's 32-bit finalizer fmix32.

Definition at line 22 of file hash.h.

References murmur3().

Referenced by hash(), and murmur3().

◆ operator<<()

FE_API std::ostream & fe::operator<< ( std::ostream & ,
Diag::Tag  )

References operator<<().

Referenced by operator<<().

◆ pad()

std::uint64_t fe::pad ( std::uint64_t offset,
std::uint64_t align )
nodiscardconstexprnoexcept

Rounds offset up to the next multiple of align.

Definition at line 42 of file algo.h.

References pad().

Referenced by pad().

◆ pop() [1/2]

template<Queuelike Q>
Q::value_type fe::pop ( Q & q)
nodiscard

Definition at line 34 of file container.h.

References pop().

◆ pop() [2/2]

template<Stacklike S>
S::value_type fe::pop ( S & s)
nodiscard

Definition at line 27 of file container.h.

References pop().

Referenced by pop(), pop(), and fe::Worklist< Set, C >::pop().

◆ Restore()

template<class T>
fe::Restore ( T & ,
T  ) -> Restore< T >

The primary template has no two-argument constructor to deduce this one from.

◆ Span() [1/7]

template<class T, size_t N>
fe::Span ( const std::array< T, N > & ) -> Span< const T, N >

◆ Span() [2/7]

template<Vectorlike Vec>
fe::Span ( const Vec & ) -> Span< const typename Vec::value_type, std::dynamic_extent >

◆ Span() [3/7]

template<class I, class E>
fe::Span ( I ,
E  ) -> Span< std::remove_reference_t< std::iter_reference_t< I > > >

◆ Span() [4/7]

template<class R>
fe::Span ( R && ) -> Span< std::remove_reference_t< std::ranges::range_reference_t< R > > >

◆ Span() [5/7]

template<class T, size_t N>
fe::Span ( std::array< T, N > & ) -> Span< T, N >

◆ Span() [6/7]

template<class T, size_t N>
fe::Span ( T(&) [N]) -> Span< T, N >

◆ Span() [7/7]

template<Vectorlike Vec>
fe::Span ( Vec & ) -> Span< typename Vec::value_type, std::dynamic_extent >

◆ splitmix64()

uint64_t fe::splitmix64 ( uint64_t h)
constexprnoexcept

SplitMix64's 64-bit finalizer.

Definition at line 32 of file hash.h.

References splitmix64().

Referenced by hash(), and splitmix64().

◆ StreamFn()

template<class F>
fe::StreamFn ( F ) -> StreamFn< F >

◆ throwf()

template<class T = std::logic_error, class... Args>
void fe::throwf ( cite_string< Args... > fmt,
Args &&... args )

<

std::format for a message that follows that convention; assemble a fragment of your own with it.

The Cited it yields is markup wherever it is used as an argument again - no re-wrapping needed. Throws a T (a std::logic_error by default) whose message is format_cite(fmt, args...). Use this for unrecoverable errors that should surface as a proper exception with a formatted message. The message is rendered here, so - like fe::Error::Bail - the what() is finished text a generic handler may print as is, not markup someone else still has to resolve. Colors follow term::auto_detached, just like the message fe::Log builds in a detached buffer.

Definition at line 279 of file term.h.

References fe::term::Red, fe::term::render_cite(), fe::term::Reset, and throwf().

Referenced by fe::RuntimeCast< B >::expect(), and throwf().

◆ to_underlying()

template<fe::BitEnum E>
auto fe::to_underlying ( E e)
constexprnoexcept

Definition at line 28 of file enum.h.

References to_underlying().

Referenced by has_flag(), operator&(), operator^(), operator|(), and to_underlying().

◆ unreachable()

◆ Vector()

template<class I, class A = std::allocator<typename std::iterator_traits<I>::value_type>>
fe::Vector ( I ,
I ,
A = A() ) -> Vector< typename std::iterator_traits< I >::value_type, Default_Inlined_Size< typename std::iterator_traits< I >::value_type >, A >

Variable Documentation

◆ Default_Inlined_Size

template<class T>
size_t fe::Default_Inlined_Size = std::max((size_t)1, 4 * sizeof(size_t) / sizeof(T))
staticconstexpr

Use up to 4 words (i.e., 4 * sizeof(size_t)) of inlined storage, rounded up.

Definition at line 21 of file vector.h.

Referenced by Vector().

◆ fnv1_offset

size_t fe::fnv1_offset = sizeof(size_t) == 4 ? size_t(UINT32_C(2166136261)) : size_t(UINT64_C(14695981039346656037))
inlineconstexpr

FNV-1 magic numbers for sizeof(size_t).

Definition at line 64 of file hash.h.

Referenced by hash_begin().

◆ fnv1_prime

size_t fe::fnv1_prime = sizeof(size_t) == 4 ? size_t(UINT32_C( 16777619)) : size_t(UINT64_C( 1099511628211))
inlineconstexpr

Definition at line 65 of file hash.h.

Referenced by hash_combine(), and hash_combine().