f381c24f29
types: add a 'has_native' trait
...
Returns true if 'ValueT::native ()' is available.
2019-02-27 11:14:45 +11:00
f6056153e3
rename root namespace from util to cruft
...
This places, at long last, the core library code into the same namespace
as the extended library code.
2018-08-05 14:42:02 +10:00
803acc9a87
relicense under MPL-2.0
2018-08-04 15:14:06 +10:00
12d401b98b
tuple/variadic: split into type/value/pack operations
2018-03-15 23:48:21 +11:00
a93dd90da9
types: remove elems function, prefer std::size
...
Now that std::size is part of our supported compilers we can remove the
old elems function.
2016-11-17 18:06:39 +11:00
1c9d446d87
types: add param_count function
2016-03-11 19:16:17 +11:00
fa9a2e3864
types: style
2016-01-27 15:32:58 +11:00
e5dd121ece
types: add std::data analogue
2015-11-05 13:17:59 +11:00
e12edc6c0a
types: add elems implementation for container types
2015-10-06 15:20:51 +11:00
29af32106b
types: add type_tag helper struct
2015-04-20 17:48:11 +10:00
7ae57730f0
whitespace
2015-04-13 18:06:08 +10:00
2658b41ea1
relicence under Apache-2.0
2015-04-13 18:05:28 +10:00
f3733b1cbc
types: remove internal make_unique implementation
...
we can use the c++1y implementation instead which is a lot more robust.
2014-12-16 15:29:49 +11:00
5c862400a4
types: add first, returns first true argument
2014-07-07 15:21:17 +10:00
95c6d56cf9
Make elems parameters const
2014-03-03 14:09:41 +11:00
b1e5c5c309
Make elems function constexpr
2013-09-20 17:33:25 +10:00
5ac2e6e26b
Remove unneeded clang path for elems
2013-02-26 17:51:34 +11:00
8c5dd1eea1
Fixup whitespace
2012-06-20 16:48:29 +10:00
6ff8405c6a
Allow sign_cast to same type
2012-06-13 16:01:42 +10:00
f9cc4926f2
Categorise functionality from types.hpp
2012-05-25 15:19:07 +10:00
4f5d75a1df
Make all check macros uppercase
2012-05-11 12:34:21 +10:00
77942e008d
Change my email to an active domain
2012-04-23 13:10:50 +10:00
18b862350a
Add traits helpers for dereferencable types
2012-04-13 11:30:50 +10:00
af05331358
Move sign function to maths.hpp
2012-04-13 11:23:55 +10:00
f499779ffc
Use forwarding for make_unique arguments
2012-01-04 17:04:17 +11:00
a4e6f67bc5
Add fourcc type
2011-08-29 14:32:12 +10:00
b642590ab2
Update a missing required header
2011-07-29 17:37:05 +10:00
3a13bdfa34
Add missing licencing headers
2011-07-20 20:34:46 +10:00
31796b34f6
Add pure annotation to simple maths and ntoh funcs
2011-07-16 15:53:53 +10:00
64448e7e5e
Add a make_unique implementation
2011-07-16 14:47:34 +10:00
bc30b7c197
Initial trunc_cast implementation
2011-07-05 23:19:00 +10:00
be643f96d7
Remove now unnecessary sign_type template helper
2011-07-05 23:06:41 +10:00
6910ef10b9
New sign_cast implementation using SFINAE
...
* Uses enable_if to guarantee same size types for argument/return
* Uses type_traits to check signedness for specialisation
2011-07-05 22:55:18 +10:00
128d46d9ad
Use explicit sized integer types for sign_types<T>
...
When we used size_t/ssize_t they conflicted with the system's word sized
integers. This should work well for all the numeric types we're likely
to see.
2011-07-03 16:08:36 +10:00
212dcbfbd8
Add sign_types specialisation for size_t/ssize_t
2011-06-23 22:06:52 +10:00
898d082fb0
Expand brief documentation for classes
2011-06-23 22:06:28 +10:00
c8804cbe8e
Added generic hton and ntoh functions
2011-06-21 23:36:51 +10:00
f924c990df
Add template based elems implementation
2011-06-21 20:16:39 +10:00
4891c6af0e
Add sign_cast functions
...
These safely cast between signed and unsigned numeric quantities,
aborting if the result cannot be safely converted (as opposed to size
expanding or throwing).
2011-06-15 22:38:58 +10:00
745e06d1af
initial import from waif
2011-05-23 17:18:52 +10:00