Commit Graph

2405 Commits

Author SHA1 Message Date
f09babd507 matrix: add simple header comment 2018-03-13 22:33:54 +11:00
95d13b9fe4 geom/aabb: rename p0,p1 to lo,hi
this makes their meaning more explicit
2018-03-13 15:42:29 +11:00
583e4aa26d coord/ops: fix incorrect invoke function name 2018-03-13 15:41:48 +11:00
e0fb8e4e6b rational: assert the denominator is nonzero on reduce
this placates clang-analyzer
2018-03-13 14:39:51 +11:00
3a4f6ffce8 tuple: remove `call' as it now duplicates std::apply 2018-03-13 14:39:38 +11:00
17816021b9 coord/ops: add std::{cos,sin} overloads for coords 2018-03-13 14:39:38 +11:00
3e9e9bff5a coord/ops: add elementwise apply 2018-03-13 14:39:38 +11:00
16c6a6d627 coord/ops: move `get' query to top for usage later 2018-03-13 14:39:38 +11:00
f4465329c8 tuple: add a map function over a tuple 2018-03-13 14:39:38 +11:00
741012151b types/traits: add inner_type query for ::value_type 2018-03-12 23:11:26 +11:00
5bc2cf12d4 maths: use true constexpr values for pi 2018-03-12 23:06:15 +11:00
d1c6df8bf1 coord/ops: add simple cosine wrapper 2018-03-12 23:04:17 +11:00
92de21982a coord/ops: use manual integer casting for floor 2018-03-12 23:04:04 +11:00
d0f075108e maths: remove gcd in favour of the std implementation 2018-03-11 15:21:36 +11:00
d00d724296 alloc/allocator: take type into account for sizes and ptrs 2018-03-07 17:57:10 +11:00
87fc5df03d alloc/allocator: add forgotten type parameter for forward call 2018-03-07 17:56:42 +11:00
3867b9e74e alloc/forwarding: add statically typed forwarding allocator 2018-03-07 16:24:39 +11:00
ba19aebe88 point/vector: give homog a default dimensionality 2018-03-06 18:13:46 +11:00
d29f2ed235 colour: style 2018-03-06 18:13:39 +11:00
01b1c01a07 matrix: use longer names for look_at variables 2018-03-06 13:54:12 +11:00
048abab55e matrix: instantiate orth for floats 2018-03-06 13:53:57 +11:00
c2a880c290 matrix: fix missed negation on one component of ortho 2018-03-06 13:53:39 +11:00
b23c274742 alloc/foreign: don't use a null base pointer
We can't use null for the proxy view passed to the successor allocators
because it triggers undefined behaviour.
2018-03-05 15:58:36 +11:00
923ba6b745 types/traits: add dedicated function argument counting trait 2018-03-03 13:42:10 +11:00
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