using chash128 = __uint128_t;
using chash64 = uint64_t;
constexpr size_t CKilobyte = 1024;
constexpr size_t CMegabyte = CKilobyte * CKilobyte;
constexpr size_t CGigabyte = CMegabyte * CKilobyte;
template<class T, class S> concept CSame = std::same_as<std::remove_cvref_t<T>, S>;
template<class T, class S> concept CConvertible = std::is_convertible_v<T, S>;
template<class R, class T> concept CContainerRange = std::ranges::input_range<R> && std::convertible_to<std::ranges::range_reference_t<R>, T>;
template<class T> concept CTransparent = requires{ typename T::is_transparent; };
template<class T> concept CAllocator = requires(T& allocator, size_t size){ typename T::value_type; allocator.allocate(size); };
template<class T> concept CInteger = (std::is_integral_v<std::remove_cvref_t<T>> || CSame<T, chash>) && !CSame<T, bool>;
template<class T> concept CFloat = std::is_floating_point_v<std::remove_cvref_t<T>> || CSame<T, half>;
template<class T> concept CAnySet = CIsSet_<std::remove_cvref_t<T>>::value;
template<class T> concept CAnyMap = CIsMap_<std::remove_cvref_t<T>>::value;
template<class T> concept CLockable = requires(T v){ v.lock(); v.unlock(); };
template<class T> concept CReadLockable = requires(T v){ v.readLock(); v.readUnlock(); };
template<class T> concept CWriteLockable = requires(T v){ v.writeLock(); v.writeUnlock(); };
template<class T> concept CStorable = requires(CBuffer& b, const std::remove_cvref_t<T>& v){ std::remove_cvref_t<T>(b); v.store(b); };
template<class T> concept CHashable = requires(const T v){ v.hash(); };
template <typename T> constexpr bool CIsTuple = false;
template<typename... Types> constexpr bool CIsTuple<std::tuple<Types...>> = true;
constexpr bool COutputComma = false;
using cspan = cspan_<size_t>;
template<CNumeric T> inline constexpr T CMin = std::numeric_limits<T>::lowest();
template<> inline constexpr half CMin<half> = -__FLT16_MAX__;
template<CNumeric T> inline constexpr T CMax = std::numeric_limits<T>::max();
template<> inline constexpr half CMax<half> = __FLT16_MAX__;
template<CFloat T> inline constexpr T CInf = std::numeric_limits<T>::infinity();
template<CFloat T> inline constexpr T CNan = std::numeric_limits<T>::quiet_NaN();
inline std::ostream& operator<<(std::ostream& ostr, half v);
inline std::ostream& operator<<(std::ostream& ostr, const chash& h);
template<class S, class T> inline std::ostream& operator<<(std::ostream& ostr, const std::pair<S, T>& p);
template<typename... T> inline std::ostream& operator<<(std::ostream& out, const std::tuple<T...>& t);
template<CAnyMap T> inline std::ostream& operator<<(std::ostream& ostr, const T& m);
template<CInteger I> cspan_<I> cSpan_(I i);
template<class T> requires(!std::is_integral_v<T>) auto cSpan_(const T& v);
template<CInteger I> cspan_<I>&& cSpan_(cspan_<I>&& s);
Adapts an integer count to [0,count), forwards a collection’s span(), or passes through an existing numeric span. Used by generated numeric iteration code.
inline int cRequiredBytes(int64_t i);
Returns the legacy signed-integer encoding width code: 0 for values from 0 through 127, otherwise 1, 2, 4, or 8. The zero code is special and should not be treated as an ordinary allocation size.
template<size_t J, class S, class... Ts> void cReadTuple__(const std::tuple<Ts...>& t, S& s);
Legacy tuple-to-sequence helper. Its current template forwarding is incomplete and should not be used for general tuple conversion; prefer a container’s fromTuple() where available.
template<size_t I, class T> decltype(auto) cIdx_(T&& x);
template<size_t I, class... Ts> decltype(auto) cIdx_(const std::tuple<Ts...>& t);
template<size_t I, class... Ts> decltype(auto) cIdx_(std::tuple<Ts...>& t);
template<size_t I, class S, class T> decltype(auto) cIdx_(const std::pair<S, T>& t);
template<size_t I, class S, class T> decltype(auto) cIdx_(std::pair<S, T>& t);
Selects a compile-time index from a tuple, pair, or indexable value. Preserves the selected element’s reference category for binding and assignment.