Commit Graph

2931 Commits

Author SHA1 Message Date
15fad39e8a alloc/foreign: add warning about non-trivial child allocators 2018-03-02 12:45:52 +11:00
950ac2229f alloc/foreign: correctly rebase 'offset' 2018-03-02 12:45:27 +11:00
a40b1254c1 build: remove reference to deleted header... 2018-03-02 12:26:12 +11:00
c2265b9ed2 alloc: add aligned::foreign allocator
sometimes we need to ensure memory allocation has a particular alignment
in an _offset_ buffer (which we have no control over, eg renderdoc's
OpenGL buffers).

this applies an offset to various operations that make the
aligned::direct allocator correctly align allocations for buffers that
aren't themselves aligned.
2018-03-02 12:21:38 +11:00
825ca4a7e7 tap: add expect_mod test 2018-03-02 12:21:38 +11:00
7e11707c39 view: remove ambiguous operator-
this operation is identical to the more appropriately named 'consume'
which should be used in its stead.
2018-03-02 12:21:38 +11:00
89a28322ad pointer: add align overload for pointer-views 2018-03-02 12:15:43 +11:00
35537b07ca alloc/aligned: add accessor for alignment 2018-03-01 14:43:37 +11:00
7af076e2de alloc: prefer std::byte representations for iterators
this allows the users to more easily walk the byte ranges (or perform
simply pointer arithmetic), without as much danger of using the values
in an expression inadvertantly.
2018-02-28 17:55:56 +11:00
2941a5a3e1 alloc/raw: add 'data' accessor 2018-02-28 16:19:27 +11:00
0e3fa05f05 build: migrate from ipp files to pure hpp files
ipp files weren't a great way of keeping things clean, and IDEs have a
little trouble dealing with the split configuration. this simplifies
debugging a great deal.
2018-02-28 11:49:13 +11:00
3b3f9cd3d3 coord/ops: use the coord type for literal equality comparisons 2018-02-26 13:37:08 +11:00
79d19b4f4f view: add noexcept to data()
This prevents GCC from warning about possible noexcept additions
(-Wnoexcept)
2018-02-26 10:55:10 +11:00
1f270f760f posix/fd: increment iterators by sizeof(ValueT) not byte count 2018-02-26 10:54:55 +11:00
db4f09628f view: add make_byte_view convenience method. 2018-02-01 13:49:28 +11:00
8c8a252d9f build: prefer nodiscard over warn_unused_result 2018-02-01 13:47:42 +11:00
fd03c344b2 fd: remove const from members that modify fd state 2018-02-01 13:47:14 +11:00
35e3f69ad2 maths, view: rationalise equal,almost_equal,==
views should not do elementwise comparisons for equality operators.
they are pairs of iterators and are only equal if their iterators are
equal.

instead, use `equal` for elementwise equality. we update the name of
exactly_equal to perform this operation too.
2018-01-31 19:33:42 +11:00
5d32408126 io: allow write to take rvalue file objects
This simplifies using temporaries in a few locations.
2018-01-31 19:31:57 +11:00
9045e16476 io: expose only view style read/write from io module
Allow the destination file-like object to implement whatever style
writers and readers they want, but don't expose those directly via the
io module.
2018-01-31 19:30:48 +11:00
6f14c7c65b view: allow implicit conversion from const*const* to const** 2018-01-30 16:25:48 +11:00
c9cc38eac7 cast: tighten type constraints for narrow cast 2018-01-30 16:25:28 +11:00
18a7790a2a macro: trivial preprocessor for includes 2018-01-30 12:53:43 +11:00
8682381618 io: add slurp overload for string views 2018-01-30 12:53:43 +11:00
c4e0cd31f9 string: move tokeniser into the header
This allows more varied template parameters to be used.
2018-01-30 12:53:43 +11:00
32a4aa23e5 view: add slicing operation, stolen from python 2018-01-30 12:53:43 +11:00
f9a202877a iterator: add make_infix example 2018-01-26 14:05:21 +11:00
d206b316a9 strongdef: style 2018-01-24 17:31:22 +11:00
6f51b82f65 siphash: add initial implementation 2018-01-23 18:57:04 +11:00
dd9a4a4646 xxhash: update copyright date 2018-01-23 18:57:04 +11:00
bc4a0c3179 xxhash: rewrite for safety and accurate tests
there were a few potential buffer overflows, inaccurate test data, and
the 64 bit path wasn't correct.

fixes buffer overflow from clang-analyze
2018-01-23 18:57:04 +11:00
b5d8b6bca3 build: temporarily add -ldl unconditionally 2018-01-23 18:52:42 +11:00
dda3a4a8e7 ascii: add UDL for vector and array conversions 2018-01-23 18:51:37 +11:00
007add45f2 tuple: add query for nth parameter pack value 2018-01-23 17:25:43 +11:00
82a8446e10 build: silence various type conversion warnings 2018-01-18 11:56:42 +11:00
d037e71bba encode/base: correct decode table indexing 2018-01-17 20:10:26 +11:00
d323197459 types/bits: add bytes_uint_t and bits_uint_t 2018-01-17 20:09:21 +11:00
c7ce526383 vector: use separate cartesian/spherical tests
some tests aren't uniquely invertible, so it's more reliable to use test
data that doesn't suffer from this issue.
2018-01-17 17:45:21 +11:00
51ffcbb07e vector: add spherical canonicalisation function 2018-01-17 17:44:59 +11:00
a8b6184e65 vector: use atan2 for spherical conversions 2018-01-17 17:44:45 +11:00
a8b4c93ccd coord: mitigate gcc ICE when using redim 2018-01-17 13:28:44 +11:00
b4e242ffd4 Merge remote-tracking branch 'origin/master' 2018-01-16 15:17:25 +11:00
1d11f05918 cast: move casting functions into util::cast namespace 2018-01-16 15:11:15 +11:00
c6d025453a view: avoid signed comparison issues with sizes 2018-01-16 13:31:53 +11:00
959617277f coord: use consistent technique for assignment operators 2018-01-16 13:31:37 +11:00
65cea4afd1 point: style 2018-01-16 13:29:58 +11:00
a2daa12d03 README: update required clang version 2018-01-14 17:21:07 +11:00
aa997ca996 crypto: remove warning message in README 2018-01-14 17:20:49 +11:00
09aa86f55f crypto: remove cryptography primitives
This code can now be found in libcruft-crypto. It was removed to prevent
people relying on it, and to improve test iteration times in unoptimised
builds.
2018-01-14 17:13:21 +11:00
681768093e hash: use a consistency, less flexible, interface 2018-01-13 15:24:12 +11:00