A collection of useful C++ routines.
Go to file
2018-09-21 17:00:56 +10:00
algo algo/sort: add explicit index sorting routine 2018-09-21 12:25:47 +10:00
alloc alloc/raw/linear: enable move operators 2018-09-21 17:00:56 +10:00
coord coord;sse: fix type in intrinsic 2018-09-13 14:52:34 +10:00
debug/gdb rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
doc doc: add noise documentation stubs 2016-02-02 10:36:42 +11:00
encode build; fix compilation errors under win32 2018-08-13 14:52:40 +10:00
fixup/experimental rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
geom rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
hash rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
job build; fix compilation errors under win32 2018-08-13 14:52:40 +10:00
maths rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
memory build; add (untested) paths for win32 builds 2018-08-13 14:50:48 +10:00
parallel rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
posix posix/except: add try_call 2018-09-10 12:36:42 +10:00
rand rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
roots rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
test algo: remove doubly qualified root namespace 2018-09-21 12:25:02 +10:00
thread thread/flag_std: remove platform specific headers 2018-08-27 14:18:04 +10:00
time rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
tools rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
tuple rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
types rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
win32 win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
.gitignore build; remove unnecessary gitignore entries 2018-08-06 14:36:23 +10:00
.gitlab-ci.yml gitlab-ci: ensure python3 is installed for testing 2018-07-24 16:19:43 +10:00
.gitmodules build: don't include cmake modules in this repository 2018-07-24 16:16:53 +10:00
abnf.rl uri: extract grammar into contained ragel file 2017-12-20 12:45:05 +11:00
adapter.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
adapter.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
annotation.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
ascii.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
backtrace_execinfo.cpp backtrace: remove dependency on addr2line 2018-09-12 14:01:21 +10:00
backtrace_null.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
backtrace_stackwalk.cpp win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
backtrace_win32.cpp win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
backtrace.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
bezier1.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
bezier2.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
bezier3.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
bezier.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
bezier.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
bitwise.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
bitwise.hpp bitwise: prefer template SFINAE over param SFINAE 2018-08-07 16:58:02 +10:00
cast.hpp cast: suppress more warnings for 'ffs' 2018-08-20 15:08:15 +10:00
CMakeLists.txt coord;sse: add configuration option to enable SSE specialisation 2018-09-13 14:52:00 +10:00
cmdopt.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
cmdopt.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
colour.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
colour.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
coord.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
COPYING relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
cpp.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
cpp.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
cpuid_x86.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
cpuid_x86.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
cpuid.cpp cpuid: add initial trivial CPUID queries 2018-03-18 17:29:44 +11:00
cpuid.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
debug_posix.cpp debug;posix: log that we're waiting for a debugger 2018-09-12 14:02:27 +10:00
debug_win32.cpp win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
debug.cpp debug: print more extensive errors during abort_with_trace 2018-09-14 13:50:14 +10:00
debug.hpp debug: defend against renaming of panic using macros 2018-08-24 17:31:54 +10:00
Doxyfile.in doc: improve naive doxygen support 2016-02-26 17:04:54 +11:00
endian.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
endian.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
exe_freebsd.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
exe_linux.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
exe_win32.cpp win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
exe.hpp exe: add trivial docstring 2018-08-28 16:35:06 +10:00
extent.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
extent.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
fixed.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
fixed.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
float.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
float.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
format.cpp.rl rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
format.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
fourcc.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
fourcc.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
functor.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
gcc.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
hash.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
introspection.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
introspection.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
io_posix.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
io_posix.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
io_win32.cpp win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
io_win32.hpp win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
io.cpp build; fix compilation errors under win32 2018-08-13 14:52:40 +10:00
io.hpp win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
iterator.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
kmeans.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
libcruft.pc.in rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
library_posix.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
library_posix.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
library_win32.cpp library/win32: conform to the template query signature 2018-08-20 16:13:49 +10:00
library_win32.hpp win32/windows: add a defensive windows wrapper header 2018-08-27 14:16:27 +10:00
library.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
log.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
log.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
maths.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
maths.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
matrix2.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
matrix3.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
matrix4.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
matrix.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
matrix.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
nocopy.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
parse.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
parse.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
pascal.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
pascal.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
platform.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
point.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
point.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
pointer.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
polynomial.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
polynomial.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
pool.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
pool.hpp build; fix compilation errors under win32 2018-08-13 14:52:40 +10:00
preprocessor.py preprocessor: don't explicitly raise StopIteration 2018-08-10 13:40:16 +10:00
quaternion.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
quaternion.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
random.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
random.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
range.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
range.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
rational.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
rational.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
README.adoc rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
region.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
region.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
rfc3986.rl rfc3986: don't enforce actions for rules 2017-12-26 17:34:08 +11:00
sarray.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
sarray.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
scoped.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
si.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
si.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
signal.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
signal.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
singleton.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
stats.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
stats.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
std.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
stream.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
stream.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
string.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
string.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
stringid.cpp stringid: use string_view for accessors 2018-09-18 16:36:03 +10:00
stringid.hpp stringid: add at method 2018-09-18 16:36:28 +10:00
strongdef.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
strongdef.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
tap.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
tap.hpp build; fix compilation errors under win32 2018-08-13 14:52:40 +10:00
term.cpp build; fix compilation errors under win32 2018-08-13 14:52:40 +10:00
term.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
time_posix.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
time_win32.cpp build; fix compilation errors under win32 2018-08-13 14:52:40 +10:00
time.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
time.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
typeidx.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
typeidx.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
types.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
uri.cpp.rl rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
uri.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
utf8.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
utf8.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
variadic.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
variadic.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
vector.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
vector.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
version.cpp.rl rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
version.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
view.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
view.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
zlib.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
zlib.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00

== libcruft

A simple cross-platform C++ utility library.

Supported compilers: >=clang-5.x, >=gcc7.x; specifically, we require cxx17 features such as structured bindings which aren't present in older compilers. No attempt has been made to compile under MSVC.

=== Environment Variables

The following variables can be defined at runtime to change the library behaviour.

DEBUG:: whether to initialise basic debugging features at load time. the value is irrelevant; the test is for whether the variable is defined.
DEBUG_WAIT:: whether to wait for a debugger to attach before executing `main`.

LOG_LEVEL:: minimum log level that will render to the logging stream. note that a given level may have been compiled out and may not be present, eg. DEBUG tends to only be present for debug builds.
BREAK_LEVEL:: minimum log level that will trigger a breakpoint

JOB_THREADS:: default number of threads to spin up for job queues.
JOB_DEPTH:: the default size of the pending work item queue for a job queue.

Ideally one would not resort to using these variables, but they may make debugging a little easier in some circumstances.