A collection of useful C++ routines.
Go to file
2019-08-29 13:09:54 +10:00
algo debug: split debug headers into components 2019-05-17 12:26:08 +10:00
alloc debug: split debug headers into components 2019-05-17 12:26:08 +10:00
array array/darray: style 2019-08-28 17:31:38 +10:00
buffer scoped: rename disabling methods for consistency 2019-08-12 12:58:44 +10:00
coord preprocessor: use the correct include path for preprocessor.hpp 2019-06-20 11:44:04 +10:00
cpuid cpuid/x86: use leaf 80000008 for AMD physical core counts 2019-06-28 16:57:47 +10:00
debug debug/memory: add asan and valgrind annotation functions 2019-08-14 11:27:49 +10:00
encode debug: split debug headers into components 2019-05-17 12:26:08 +10:00
fixup/experimental build: transition from experimental filesystem 2018-12-05 19:12:03 +11:00
geom g/sample/surface: add region sampling 2019-08-21 08:27:07 +10:00
hash debug: split debug headers into components 2019-05-17 12:26:08 +10:00
iterator build: add some forgotten, required, headers 2019-08-28 12:55:15 +10:00
job thread: add minimal thread primitives for win32 2019-06-22 15:46:34 +10:00
map map/fixed: add a find function, and use it internally 2019-06-04 17:42:59 +10:00
maths debug: split debug headers into components 2019-05-17 12:26:08 +10:00
memory build: update the meson build configuration 2019-06-19 17:28:01 +10:00
parallel parallel/stack: add clone method 2019-08-02 08:13:39 +10:00
parse parse/enum: add some descriptive comments 2019-08-29 13:09:54 +10:00
posix posix/fd: fix the win32 pwrite emulation 2019-07-01 15:44:17 +10:00
rand rdrand: silence a type conversion warning under clang 2019-07-29 11:20:09 +10:00
roots rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
test parse/enum: add support fro enum classes 2019-08-26 12:18:37 +10:00
thread thread/win32: add sleep_until implementation 2019-08-20 10:48:18 +10:00
time debug: split debug headers into components 2019-05-17 12:26:08 +10:00
tools build: remove buzstats tool 2019-04-23 08:19:47 +10:00
tuple tuple/value: forward the arguments from map to the helper function 2019-03-18 14:09:29 +11:00
types types/traits: add try_signed_t 2019-08-09 11:39:58 +10:00
win32 thread: add minimal thread primitives for win32 2019-06-22 15:46:34 +10:00
.gitignore build; remove unnecessary gitignore entries 2018-08-06 14:36:23 +10:00
.gitlab-ci.yml build;gitlab: set CMAKE_MODULE_PATH to our local cmake modules 2019-06-29 09:13:26 +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 adapter: add the 'identity' adapter 2019-08-06 14:31:48 +10:00
annotation.hpp build: add doxygen comments for various headers 2019-01-03 11:15:00 +11:00
ascii.hpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
backtrace_execinfo.cpp backtrace: give consistent outputs for backtrace 2019-07-02 16:39:40 +10:00
backtrace_null.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
backtrace_stackwalk.cpp backtrace: give consistent outputs for backtrace 2019-07-02 16:39:40 +10:00
backtrace_win32.cpp backtrace: give consistent outputs for backtrace 2019-07-02 16:39:40 +10:00
backtrace.hpp backtrace: give consistent outputs for backtrace 2019-07-02 16:39:40 +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 debug: split debug headers into components 2019-05-17 12:26:08 +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 debug: split debug headers into components 2019-05-17 12:26:08 +10:00
cast.hpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
CMakeLists.txt geom/sample: add edge sampling routines for extent2i 2019-08-20 15:00:26 +10:00
cmdopt.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
cmdopt.hpp introspection: use __FUNCTION__ parsing method for type_name queries 2019-04-16 10:17:53 +10:00
colour.cpp parse: move si and value parsing into common namespace 2019-03-19 12:38:22 +11: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 build: transition from experimental filesystem 2018-12-05 19:12:03 +11:00
cpp.hpp build: transition from experimental filesystem 2018-12-05 19:12:03 +11:00
cpuid.cpp cpuid: add initial trivial CPUID queries 2018-03-18 17:29:44 +11:00
cpuid.hpp cpuid: defend against unknown architectures 2019-06-20 11:44:43 +10:00
debug_posix.cpp debug;posix: prefer SIGINT for breakpoint 2019-07-02 17:36:09 +10:00
debug_win32.cpp win32: fix the paths to debug headers 2019-06-06 13:28:16 +10:00
Doxyfile.in Doxyfile: Use CMake variables in preference to autotools variables 2019-01-03 11:15:00 +11:00
endian.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
endian.hpp endian: be less clever with value operators 2019-02-03 16:37:08 +11:00
except.cpp except: add custom base exception 2018-12-03 15:29:21 +11:00
except.hpp except: error::describe shouldn't be noexcept 2019-02-02 15:35:44 +11:00
exe_freebsd.cpp build: transition from experimental filesystem 2018-12-05 19:12:03 +11:00
exe_linux.cpp build: transition from experimental filesystem 2018-12-05 19:12:03 +11:00
exe_win32.cpp build: many compilation fixes for win32 2019-01-04 17:13:21 +11:00
exe.hpp build: transition from experimental filesystem 2018-12-05 19:12:03 +11:00
expected.hpp expected: add a trivial move constructor 2019-03-19 17:08:35 +11:00
extent.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
extent.hpp extent: use matching types for random calls 2019-04-11 11:48:34 +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 debug: split debug headers into components 2019-05-17 12:26:08 +10:00
float.hpp build: many compilation fixes for win32 2019-01-04 17:13:21 +11:00
format.cpp.rl rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
format.hpp format: support string_view as a string 2019-04-16 10:18:10 +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 functor: add construct and tuple_construct 2019-02-05 12:13:53 +11:00
gcc.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
hash.hpp hash: add a variadic mix operator 2019-05-12 07:52:39 +10:00
introspection.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
introspection.hpp preprocessor: use the correct include path for preprocessor.hpp 2019-06-20 11:44:04 +10:00
io_posix.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
io_posix.hpp io;posix: implement move constructor for mapped_file 2019-01-17 19:49:45 +11:00
io_win32.cpp win32: fix the paths to debug headers 2019-06-06 13:28:16 +10:00
io_win32.hpp io_win32: add move operators to mapped_file 2019-03-27 19:08:55 +11:00
io.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
io.hpp io: add iterative file reading helper 2019-06-19 12:01:26 +10:00
kmeans.hpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
libcruft.pc.in build: correctly install the pkg-config file 2019-06-18 11:26:59 +10:00
library_posix.cpp build: transition from experimental filesystem 2018-12-05 19:12:03 +11:00
library_posix.hpp build: transition from experimental filesystem 2018-12-05 19:12:03 +11:00
library_win32.cpp build: many compilation fixes for win32 2019-01-04 17:13:21 +11:00
library_win32.hpp thread: add minimal thread primitives for win32 2019-06-22 15:46:34 +10:00
library.hpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
log.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
log.hpp preprocessor: use the correct include path for preprocessor.hpp 2019-06-20 11:44:04 +10:00
maths.cpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
maths.hpp maths: add pow2 convenience function 2019-03-28 14:28:08 +11: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 debug: split debug headers into components 2019-05-17 12:26:08 +10:00
matrix.hpp iterator: move each iterator to their own unit 2019-03-18 16:18:27 +11:00
meson_options.txt build: update the meson build configuration 2019-06-19 17:28:01 +10:00
meson.build meson: add a declared dependency 2019-06-22 08:19:42 +10:00
platform.hpp build: many compilation fixes for win32 2019-01-04 17:13:21 +11:00
point.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
point.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
pointer.hpp build: many compilation fixes for win32 2019-01-04 17:13:21 +11: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 pool: assert that the pointer for 'index' is within our allocation 2019-08-14 13:53:06 +10:00
preprocessor.py preprocessor: add the empty, defer, obstruct, and expand macros 2019-08-02 13:41:05 +10:00
quaternion.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
quaternion.hpp quaternion: add slerp and nlerp 2019-02-07 15:45:08 +11:00
random.cpp relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
random.hpp build: don't fully qualify the installation path 2019-06-18 15:12:49 +10:00
range.cpp range: add definition for range-scalar addition 2019-05-29 12:58:46 +10:00
range.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
rational.cpp debug: split debug headers into components 2019-05-17 12:26:08 +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 region: actually act on sanity queries 2019-07-12 15:27:34 +10:00
region.hpp region: add 'sample' convenience without generator parameter 2019-08-22 13:22:48 +10:00
registrar.cpp registrar: add skeleton of plugin registry 2019-04-16 11:02:26 +10:00
registrar.hpp registrar: add skeleton of plugin registry 2019-04-16 11:02:26 +10:00
rfc3986.rl rfc3986: don't enforce actions for rules 2017-12-26 17:34:08 +11:00
scoped.hpp scoped: rename disabling methods for consistency 2019-08-12 12:58:44 +10:00
signal.cpp signal: reduce templating complexity 2019-03-13 12:08:57 +11:00
signal.hpp nocopy: remove deprecated header 2019-05-17 13:44:14 +10:00
singleton.hpp debug: split debug headers into components 2019-05-17 12:26:08 +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 debug: split debug headers into components 2019-05-17 12:26:08 +10:00
stream.hpp rename root namespace from util to cruft 2018-08-05 14:42:02 +10:00
string.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
string.hpp string: tokeniser value_type should be view<Iterator> 2019-06-20 16:31:22 +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 strongdef: don't expose the raw data directly 2019-03-20 15:39:24 +11:00
strongdef.hpp types/description: add initial enum support 2019-05-30 10:43:28 +10:00
sysinfo_posix.cpp sysinfo;posix: ensure strings are quoted 2019-06-20 14:42:38 +10:00
sysinfo_win32.cpp sysinfo;win32: don't print the username null terminator 2019-06-28 15:14:34 +10:00
sysinfo.hpp sysinfo: add a trivial system stats dump function 2019-06-20 12:37:48 +10:00
tap.cpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
tap.hpp debug: split debug headers into components 2019-05-17 12:26:08 +10:00
term.cpp build: transition from experimental filesystem 2018-12-05 19:12:03 +11: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 thread: add minimal thread primitives for win32 2019-06-22 15:46:34 +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 typeidx: prohibit return of zero values 2019-05-30 10:43:05 +10:00
typeidx.hpp typeidx: prohibit return of zero values 2019-05-30 10:43:05 +10:00
types.hpp types/description: add initial enum support 2019-05-30 10:43:28 +10:00
uri.cpp.rl debug: split debug headers into components 2019-05-17 12:26:08 +10:00
uri.hpp debug: split debug headers into components 2019-05-17 12:26:08 +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 debug: split debug headers into components 2019-05-17 12:26:08 +10:00
vector.hpp vector: note the representation of polar angles 2019-05-21 17:44:34 +10:00
version.cpp.rl debug: split debug headers into components 2019-05-17 12:26:08 +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 view: add noexcept copy/move assign/construct conditions 2019-05-24 12:16:37 +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.