- supports clang, msvc, and gcc
- supports x86, WebAssembly, and ARM (TODO)
- non-allocating
- good code generation in non-optimized builds
- 0 depenacies
- header only
uint
,size_t
,ptrdiff_t
uint8_t
,uint16_t
,uint32_t
,uint64_t
int8_t
,int16_t
,int32_t
,int64_t
types<Ts...>
- list of typesitems<T, T...Ns>
- list of scalar valuessequence_t<T, N>
- the typeitems<T, T{ 0 }, T{ 1 }, ..., T{ N - 1 }>
using log N compile time recursion
tuple<Ts...>
- basic tuple support,box<T>
,pair<T, U>
span<T>
- contiguous range ofT*
bulk<N, T>
- fixed sized container of [0,N
)T
's
vec<N, T, Ks...>
- small simd style vectorsN
= [0, 4] with optional unit tagsKs...
sqrx()
,dotx()
, andcrossx()
- operations on scalars andvec
's which expand types by 2x bitsin_polygon_xy()
andin_polygon()
- generic point in polygon test (winding number) for types with.x
&.y
memberscrc32
-constexpr
fast, header only, type safe 32 bit cyclic redundancy checkfnv1a
-constexpr
fnv hashingxoroshiro64ss
- easy, good, compact random number generator https://prng.di.unimi.it/xoroshiro64starstar.cbase64
-constexpr
base64 decode
to_text(char *, Ts...)
- convert any typed value to text (non terminated utf-8)as_string
- form a fixed size null terminated array of utf-8 chars "inline"
debug_out()
- output to the debuggermonotonic_timestamp()
- monotonic non stop timestampmonotonic_frequency()
- frequency of monotonic non stop timestampopen_file()
close_file()
map_span()
- memory map a file as aspan
unmap_span()
virtual_alloc()
log()
- default logging hook todebug_out
CE_STATIC_ASSERT()
- pre c++17 static_assert with optional and better error messgesCE_CPU_X86
,CE_CPU_X86_32
,CE_CPU_X86_64
- x86 compile time cpu detectionCE_CPU_WASM
,CE_CPU_WASM_32
,CE_CPU_WASM_64
- WebAssembly compile time cpu detectionCE_DEBUG_BREAK()
- break to debuggerCE_TIMESTAMP()
- high resolution timestamp counter (e.g. rdtsc on x86)CE_MEMCPY()
- memcpy intrinsicCE_MEMSET()
- memset intrinsicCE_ROTL32()
- rotate left intrinsicCE_STRLEN()
- strlen intrinsicCE_ERROR()
,CE_ASSERT()
,CE_VERIFY()
, andCE_FAILED()
- runtime error checkingCE_COUNTOF()
- compile time array extentCE_FOLD_LEFT_COMMA()
- pre c++17 left comma fold expressionCE_LOG(level, expressions...)
- user hookable structured loggingCE_LOG_MSG(level, values...)
- user hookable message logging
int time = 42;
int money = 1000000;
CE_LOG(fail, time, money);
CE_LOG_MSG(info, "The answer is ", 6 * 7, "!");
F: { "$": "fail", "time": "42", "money": "1000000" }
I: { "$": "info", "$msg": "The answer is 42!" }
- ultra low overhead atomics similar to
std::atomic<T>
, but using reference parameters and minimal function call depth for optimal debug and release codegen
- fully deterministic, integer based, constrained delaunay triangulation with low memory footprint
- hash table
- reflection for struct serialization/deserialization
constexpr
lzss style compression
- more math...
thread_mutex
andthread_shared_mutex
- type -> string:
char (&nameof<T>())[N]
- enum value <-> string:
char const* nameof(T n)
T as_enum(char const name[], T unknown = T{ })
- object pool
- intro sort
- Morton Z ordering https://en.wikipedia.org/wiki/Z-order_curve