A collection of useful C++ routines.
Go to file
Danny Robson 77c7d87d60 region: remove incorrect union accessors
the union accessors x,y,w,h were predicated on the dimension being 2.
for higher/lower dimensions this resulted in the incorrect variable
being returned.

rather than do something fancy with unions and coord storage type for
access to the underlying data we force the user to acknowledge the split
storage of point/extent.

unfortunately we have pretty shitty names for the components as a
result.
2016-10-25 19:59:53 +11:00
alloc build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
build-aux test/json: run tests through a line wine/crlf wrapper 2016-04-27 17:13:36 +10:00
coord coord/base: assert we are using arithmetic types 2016-10-25 19:57:37 +11:00
crypto build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
doc doc: add noise documentation stubs 2016-02-02 10:36:42 +11:00
geom coord: instantiate signed types 2016-10-25 17:50:11 +11:00
hash build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
json build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
m4 m4/nc: bump for sanitizer options 2016-10-25 17:50:11 +11:00
memory build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
posix build: add posix forward decl 2016-10-14 18:01:16 +11:00
rand build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
roots roots/bisection: add bisection root finder 2016-02-03 13:57:18 +11:00
test matrix: move identity and zeroes into constexpr funcs 2016-10-17 22:34:53 +11:00
tools build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
types build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
win32 win32/handle: make HANDLE constructor explicit 2016-08-25 12:03:48 +10:00
.gitignore test/json: run tests through a line wine/crlf wrapper 2016-04-27 17:13:36 +10:00
.gitmodules m4: move nerdcruft m4 into submodule 2016-06-20 13:30:32 +10:00
adapter.cpp unify licences 2016-02-26 13:36:01 +11:00
adapter.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
annotation.hpp annotation: add likely/unlikely functions 2016-08-02 18:49:42 +10:00
ascii.hpp ascii: add to_integer from ascii to numeric 2016-08-02 18:50:35 +10:00
backtrace_execinfo.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
backtrace_null.cpp don't pull in namespace std 2016-03-11 13:28:56 +11:00
backtrace_stackwalk.cpp backtrace_stackwalk: add StackWalk64 backtrace 2016-04-27 16:00:26 +10:00
backtrace_win32.cpp backtrace_win32: avoid using win32 wrappers 2016-04-27 15:53:53 +10:00
backtrace.hpp backtrace/win32: enable win32 backtrace support 2016-04-19 16:08:56 +10:00
bezier.cpp stream: remove unneeded numeric class 2016-06-29 17:52:26 +10:00
bezier.hpp build: use ostream/istream over iostream 2016-08-04 17:42:41 +10:00
bitwise.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
bitwise.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
cast.hpp cast: allow trunc_cast to same type 2016-10-25 17:50:11 +11:00
cmdopt.cpp build: avoid type truncation warnings 2016-05-12 17:39:33 +10:00
cmdopt.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
cmdopt.ipp cmdopt: move bool parsing into inline headers 2016-04-27 15:52:52 +10:00
colour.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
colour.hpp colour: correct the component count of colour1u 2016-09-23 13:27:21 +10:00
colour.ipp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
configure.ac build: prefer std::thread over boost::thread 2016-10-08 17:22:21 +11:00
coord.hpp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
COPYING unify licences 2016-02-26 13:36:01 +11:00
debug_posix.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
debug_win32.cpp debug: add forgotten header for win32 2016-08-16 16:22:27 +10:00
debug.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
debug.hpp debug: revert DEBUG_ONLY name change 2016-09-28 17:24:01 +10:00
debug.ipp debug: reduce constexpr tomfoolery where not required 2016-08-01 17:23:53 +10:00
Doxyfile.in doc: improve naive doxygen support 2016-02-26 17:04:54 +11:00
endian.cpp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
endian.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
except.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
except.hpp except: add missing methods to win32_error 2016-04-27 16:07:42 +10:00
exe_freebsd.cpp exe: split into platform units 2016-10-10 16:23:07 +11:00
exe_linux.cpp exe: split into platform units 2016-10-10 16:23:07 +11:00
exe_win32.cpp exe: split into platform units 2016-10-10 16:23:07 +11:00
exe.hpp build: use experimental::fs over boost::fs 2016-10-07 19:48:42 +11:00
extent.cpp extent: instantiate is_valid for more types 2016-10-25 19:58:38 +11:00
extent.hpp coord: prefer int/unsigned to intmax/size_t 2016-10-25 17:46:36 +11:00
extent.ipp extent: make area and diameter constexpr 2016-09-28 17:21:02 +10:00
fixed.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
fixed.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
float.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
float.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
format.cpp format: reimplement format rendering 2016-07-28 13:39:27 +10:00
format.hpp format: reimplement format rendering 2016-07-28 13:39:27 +10:00
format.ipp format: allow %! specifier for all types 2016-09-27 15:23:33 +10:00
fourcc.cpp iostream: use consistent ostream format 2016-03-11 13:01:57 +11:00
fourcc.hpp iostream: use consistent ostream format 2016-03-11 13:01:57 +11:00
gcc.hpp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
guid.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
guid.hpp guid: style 2016-08-15 20:56:10 +10:00
hash.hpp hash: fix parameter names in mix wrappers 2015-09-15 21:06:00 +10:00
introspection.cpp introspection: rename type_string to type_name 2016-07-28 13:45:09 +10:00
introspection.hpp introspection: remove type_name's empty default definition 2016-08-13 21:02:57 +10:00
io_posix.cpp io: use size_t result for mapped_file::size 2016-10-25 19:57:13 +11:00
io_posix.hpp io: use size_t result for mapped_file::size 2016-10-25 19:57:13 +11:00
io_posix.ipp io: move view conversion operator to named function 2016-06-28 15:58:41 +10:00
io_win32.cpp build: use experimental::fs over boost::fs 2016-10-07 19:48:42 +11:00
io_win32.hpp build: use experimental::fs over boost::fs 2016-10-07 19:48:42 +11:00
io_win32.ipp io: move view conversion operator to named function 2016-06-28 15:58:41 +10:00
io.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
io.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
io.ipp posix/fd: extract file descriptor into own unit 2016-10-02 15:50:13 +11:00
iterator.hpp iterator: add infix_iterator 2016-03-11 12:44:00 +11:00
libcruft-util-inline.pc.in pkg-config: remove erroneous boost build flags 2016-10-11 20:51:19 +11:00
libcruft-util-system.pc.in pkg-config: remove erroneous boost build flags 2016-10-11 20:51:19 +11:00
library_posix.cpp change const char paths to std::filesystem::path 2016-10-08 17:18:18 +11:00
library_posix.hpp change const char paths to std::filesystem::path 2016-10-08 17:18:18 +11:00
library_win32.cpp change const char paths to std::filesystem::path 2016-10-08 17:18:18 +11:00
library_win32.hpp change const char paths to std::filesystem::path 2016-10-08 17:18:18 +11:00
library.hpp library: initial wrapper 2015-08-10 15:51:44 +10:00
LICENCE relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
log.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
log.hpp build: use ostream/istream over iostream 2016-08-04 17:42:41 +10:00
log.ipp format: reimplement format rendering 2016-07-28 13:39:27 +10:00
Makefile.am quaternion: move out of coord infrastructure 2016-10-17 22:30:16 +11:00
maths.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
maths.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
matrix2.cpp matrix: move identity and zeroes into constexpr funcs 2016-10-17 22:34:53 +11:00
matrix3.cpp matrix: move identity and zeroes into constexpr funcs 2016-10-17 22:34:53 +11:00
matrix4.cpp matrix: move identity and zeroes into constexpr funcs 2016-10-17 22:34:53 +11:00
matrix.cpp matrix: move identity and zeroes into constexpr funcs 2016-10-17 22:34:53 +11:00
matrix.hpp matrix: move identity and zeroes into constexpr funcs 2016-10-17 22:34:53 +11:00
matrix.ipp matrix: move identity and zeroes into constexpr funcs 2016-10-17 22:34:53 +11:00
nocopy.hpp dont overinclude iostream headers 2016-03-17 18:14:40 +11:00
pascal.cpp pascal: make size/data private 2016-03-17 18:14:40 +11:00
pascal.hpp dont overinclude iostream headers 2016-03-17 18:14:40 +11:00
platform.hpp platform: add freebsd platform defines 2016-05-13 15:23:22 +10:00
point.cpp point: add is_valid specialisation 2016-10-25 19:58:19 +11:00
point.hpp coord: prefer int/unsigned to intmax/size_t 2016-10-25 17:46:36 +11:00
point.ipp point: remove constexpr from functions relying on cmath 2015-10-06 15:20:06 +11:00
pointer.hpp pointer: add uintptr align function 2016-03-11 09:40:12 +11:00
polynomial.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
polynomial.hpp polynomial: rename solve as roots 2015-07-21 02:59:14 +10:00
polynomial.ipp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
pool.cpp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
pool.hpp use more explicit constructors 2016-03-17 18:14:40 +11:00
pool.ipp dont overinclude iostream headers 2016-03-17 18:14:40 +11:00
preprocessor.hpp preprocessor: expand MAP macros to 24 arguments 2016-06-24 13:15:01 +10:00
quaternion.cpp quaternion: add second optimised vector rotate 2016-10-18 16:45:57 +11:00
quaternion.hpp quaternion: add assignment-multiply operator 2016-10-18 16:45:38 +11:00
quaternion.ipp quaternion: move out of coord infrastructure 2016-10-17 22:30:16 +11:00
raii.hpp raii: scoped_function takes a nullary void functor 2015-11-13 13:48:46 +11:00
random.cpp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
random.hpp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
random.ipp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
range.cpp range: add subtraction operator definition 2015-09-29 17:31:20 +10:00
range.hpp build: use ostream/istream over iostream 2016-08-04 17:42:41 +10:00
range.ipp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
rational.cpp rational: add type deducing divide/multiply 2015-09-21 16:36:38 +10:00
rational.hpp rational: express assignment in terms of constructors 2016-05-12 17:55:20 +10:00
rational.ipp rational: add type deducing divide/multiply 2015-09-21 16:36:38 +10:00
README README: add crypto warning 2016-06-20 18:06:51 +10:00
region.cpp region: forward is_valid to component point and extent 2016-10-25 19:59:06 +11:00
region.hpp region: remove incorrect union accessors 2016-10-25 19:59:53 +11:00
region.ipp region: remove extent_t/point_t distinction 2016-10-25 17:50:11 +11:00
si.cpp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
si.hpp whitespace 2015-04-13 18:06:08 +10:00
signal.cpp relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
signal.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
signal.ipp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
stats.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
stats.hpp build: use ostream/istream over iostream 2016-08-04 17:42:41 +10:00
stream.cpp stream: work towards streambuf and stream impl 2016-05-12 17:47:22 +10:00
stream.hpp build: use ostream/istream over iostream 2016-08-04 17:42:41 +10:00
string.cpp string: define tokeniser::cbegin/cend 2016-03-21 14:20:04 +11:00
string.hpp string: allow cstring tokenisers 2016-03-18 11:08:12 +11:00
stringid.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
stringid.hpp build: avoid type truncation warnings 2016-05-12 17:39:33 +10:00
strongdef.cpp strongdef: actually use tagging for disambiguation... 2015-11-19 15:06:52 +11:00
strongdef.hpp strongdef: delete default constructor 2016-10-07 17:33:03 +11:00
tap.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
tap.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
tap.ipp WIP tap param rename 2016-07-28 14:18:47 +10:00
term.cpp build: silence unused var/func warnings 2016-10-11 21:43:07 +11:00
term.hpp build: avoid type truncation warnings 2016-05-12 17:39:33 +10:00
time_posix.cpp time: use std::chrono for nanoseconds query 2016-04-05 11:02:54 +10:00
time_win32.cpp time: use std::chrono for nanoseconds query 2016-04-05 11:02:54 +10:00
time.cpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
time.hpp time: use std::chrono for nanoseconds query 2016-04-05 11:02:54 +10:00
time.ipp time: use std::chrono for nanoseconds query 2016-04-05 11:02:54 +10:00
tuple.cpp tuple: add tuple iteration helpers 2015-04-20 17:48:11 +10:00
tuple.hpp build: remove unnecessary includes 2016-10-12 15:08:22 +11:00
types.hpp types: add param_count function 2016-03-11 19:16:17 +11:00
uri.cpp.rl build: fix switch/enum coverage warnings 2016-05-12 17:45:29 +10:00
uri.hpp build: avoid type truncation warnings 2016-05-12 17:39:33 +10:00
variadic.cpp variadic: add index helper type 2015-04-20 17:13:14 +10:00
variadic.hpp variadic: add index helper type 2015-04-20 17:13:14 +10:00
variadic.ipp variadic: add index helper type 2015-04-20 17:13:14 +10:00
vector.cpp vector: make cross function constexpr 2016-10-17 16:49:26 +11:00
vector.hpp coord: prefer int/unsigned to intmax/size_t 2016-10-25 17:46:36 +11:00
vector.ipp vector: make cross function constexpr 2016-10-17 16:49:26 +11:00
version.cpp.rl version: add more constructors, comparators 2016-06-20 13:08:24 +10:00
version.hpp build: use ostream/istream over iostream 2016-08-04 17:42:41 +10:00
view.cpp view: instantiate uint8_t ostream operator 2016-08-04 14:15:02 +10:00
view.hpp view: make container constructor explicit and constexpr 2016-06-28 14:09:48 +10:00
view.ipp view: make container constructor explicit and constexpr 2016-06-28 14:09:48 +10:00
zlib.cpp unify licences 2016-02-26 13:36:01 +11:00
zlib.hpp build: make single argument constructors explicit 2015-06-04 22:18:43 +10:00

A simple cross-platform C++ utility library.

For the love of God, do not use the crypto routines. I am not a cryptographer or a security specialist. You have been warned.