Skip to content

Engine → Core

detail.h

Helpers shared by the container headers. Nothing in here is part of the public API; engine code includes the container it needs (small_vector.h, flat_hash_map.h, ...) and never this file.

Type Aliases

detail::synth_three_way_result

template <synth_three_way_comparable T> using synth_three_way_result = decltype(synth_three_way(std::declval<const T &>(), std::declval<const T &>()));

Concepts

detail::synth_three_way_comparable

template <typename T> concept synth_three_way_comparable = std::three_way_comparable<T> || requires(const T &left, const T &right) { { left < right } -> std::convertible_to<bool>; };

Element types a container can order lexicographically: either three-way comparable or at least less-than comparable.

detail::transparent_compare

template <typename Compare> concept transparent_compare = requires { typename Compare::is_transparent; };

Comparators that opt into heterogeneous lookup, e.g. std::less<>.

Functions

Public

detail::fatal_container_access

[[noreturn]] CONJURE_API void fatal_container_access(const char *message);

Checked access that found nothing to return (at() on a missing key or index) is a programmer error. It asserts, then terminates even when the assertion handler continues. Defined in containers.cpp.

detail::mix_hash

[[nodiscard]] constexpr u64 mix_hash(u64 hash) noexcept;

Finaliser that spreads entropy into every bit so identity-style std::hash specialisations (integers on libstdc++) still spread across power-of-two buckets.

detail::synth_three_way

template <synth_three_way_comparable T> [[nodiscard]] constexpr auto synth_three_way(const T &left, const T &right);

The standard library's exposition-only synth-three-way: uses operator<=> when the type has one and falls back to operator< (yielding a weak ordering) otherwise, exactly like std::vector's operator<=>.