20#if HX_USE_MACROS_WITH_MODULE
21#error Header does not provide macros alone.
30using hxcstring_const_ =
const char*;
31using hxcstring_ =
char*;
34#if HX_CPLUSPLUS >= 202002L
40template<
typename from_t_,
typename to_t_>
42 requires requires {
static_cast<to_t_
>(from_()); };
50template<
typename from_t_,
typename to_t_>
59template<
typename A_,
typename B_>
60#if HX_CPLUSPLUS >= 202002L
72 return ::strcmp(a_, b_) == 0;
75 return ::strcmp(a_, b_) == 0;
78 return ::strcmp(a_, b_) == 0;
81 return ::strcmp(a_, b_) == 0;
102template<
typename A_,
typename B_>
103#if HX_CPLUSPLUS >= 202002L
116 return ::strcmp(a_, b_) < 0;
119 return ::strcmp(a_, b_) < 0;
122 return ::strcmp(a_, b_) < 0;
125 return ::strcmp(a_, b_) < 0;
151 x_ *= hxhash_prime2_;
153 x_ *= hxhash_prime3_;
169 h_ +=
static_cast<hxhash_t>(x_) * hxhash_prime3_;
170 h_ = ((h_ << 17u) | (h_ >> 15u)) * hxhash_prime4_;
171 return hxhash_avalanche_(h_);
181 h_ +=
static_cast<hxhash_t>(
static_cast<unsigned char>(*s_++)) * hxhash_prime5_;
182 h_ = ((h_ << 11u) | (h_ >> 21u)) * hxhash_prime1_;
184 return hxhash_avalanche_(h_);
hxkey_equal_t<T> - A constexpr callable that invokes hxkey_equal.
Definition hxkey.hpp:87
constexpr bool operator()(const hxremove_cvref_t< T > &a_, const hxremove_cvref_t< T > &b_) const
Definition hxkey.hpp:89
hxkey_less_t<T> - A constexpr callable that invokes hxkey_less.
Definition hxkey.hpp:131
constexpr bool operator()(const hxremove_cvref_t< T > &a_, const hxremove_cvref_t< T > &b_) const
Definition hxkey.hpp:133
hxconvertible_to - A concept that requires one type to be convertible to another.
Definition hxkey.hpp:41
hxsame_as - A concept that requires two types to be the same.
Definition hxkey.hpp:51
hxhash_t hxkey_hash(T x_)
hxkey_hash(T) - Returns the xxhash32 of a numeric value cast to 32 bits.
Definition hxkey.hpp:165
constexpr bool hxkey_equal(const A_ &a_, const B_ &b_)
hxkey_equal(const A& a, const B& b) - Returns true if two objects are equivalent.
Definition hxkey.hpp:63
constexpr bool hxkey_less(const A_ &a_, const B_ &b_)
hxkey_less(const T&, const T&) - User-overloadable function for performing comparisons.
Definition hxkey.hpp:106
#define hxinline
hxinline - Force a function to be inlined into its callers.
Definition hxsettings.h:120
#define hxinline_constexpr
hxinline_constexpr - Enables C++17 compatable "inline constexpr" usage for variables so they can be e...
Definition hxsettings.h:272
#define hxattr_nodiscard
hxattr_nodiscard - Indicates the caller should not discard the return value.
Definition hxsettings.h:89
#define hxattr_flatten
hxattr_flatten - Inline every call inside a function's body into it, recursively, regardless of the c...
Definition hxsettings.h:82
#define hxconstexpr
hxconstexpr - Enables C++23 compatable constexpr usage for functions as that has support for destruct...
Definition hxsettings.h:263
A few utility functions and most standard C++ meta programming functions.
hxremove_cv_t< hxremove_reference_t< T > > hxremove_cvref_t
hxremove_cvref_t<T> - Returns T with const, volatile, and references removed.
Definition hxutility.h:115
Provides core macros, memory management and feature detection.
uint32_t hxhash_t
hxhash_t - Unsigned 32-bit hash value. Expect collisions.
Definition libhatchet.h:212
static constexpr bool value
Definition hxutility.h:124