Mateusz Pusz
7da63eedfd
quantity refactoring
2019-11-02 13:58:10 +01:00
Mateusz Pusz
ee701cf4e7
dimension refactoring
2019-11-02 13:56:53 +01:00
Mateusz Pusz
ddd998cb53
type_list_sort_impl cleanup
2019-11-02 13:55:55 +01:00
Mateusz Pusz
2bde0e62b2
Downcasting facility refactoring
2019-11-02 13:54:43 +01:00
Mateusz Pusz
8543ab65d1
pow<0> support added
2019-10-19 20:51:20 +02:00
Mateusz Pusz
53720c82b8
fmt support started
2019-10-18 23:50:43 +02:00
Mateusz Pusz
1ea918e543
fmt dependency added
2019-10-18 23:50:12 +02:00
Mateusz Pusz
987ab86439
Added support for prefixes of non-coherent units
2019-10-18 22:36:57 +02:00
Mateusz Pusz
880528e5ca
Compile-time performance of printing a prefix improved
2019-10-18 22:34:43 +02:00
Mateusz Pusz
f5aff49fcc
fmt/format.h removed
2019-10-18 21:57:57 +02:00
Mateusz Pusz
718e56082a
Prefix definition reworked
2019-10-18 21:34:50 +02:00
Mateusz Pusz
046669fedc
gcc compilation error disabled (looks like a bug in a compiler)
2019-10-18 21:24:16 +02:00
Mateusz Pusz
b864461636
Prefixed units support redesigned
2019-10-18 15:34:46 +02:00
Mateusz Pusz
95028d10a7
gcc-10 enabled
2019-10-17 18:22:51 +02:00
Mateusz Pusz
f147da202e
Multiply symbot in a printed unit changed to '⋅'
2019-10-17 12:44:39 +02:00
Mateusz Pusz
3e30c779a6
coherent_derived_unit and custom prefixes support added
2019-10-17 10:16:44 +02:00
Mateusz Pusz
9a9abca81d
Text output support added for quantity
2019-10-16 17:04:41 +02:00
Mateusz Pusz
fe6a5da3f4
More units added for energy and power
2019-10-16 17:03:24 +02:00
Mateusz Pusz
fa2bdd1e08
More 'todo' -> 'TODO' changes
2019-10-15 21:20:01 +02:00
Mateusz Pusz
d24479bec1
exp template parameter renamed
2019-10-15 21:18:48 +02:00
Mateusz Pusz
5082aaaf70
'todo' -> 'TODO' refactoring
2019-10-15 19:05:40 +02:00
Mateusz Pusz
d31d2cf439
Base dimensions refactored
...
-
2019-10-15 19:03:45 +02:00
Mateusz Pusz
c3c5a740d9
derived_units now stores a type provided as a template parameter rather than its value
2019-10-15 15:20:37 +02:00
Mateusz Pusz
7e31dfe37e
Name renamed to symbol in a derived_unit
2019-10-15 11:47:36 +02:00
Mateusz Pusz
b889c81cb9
Short name added to derived unit definition
2019-10-15 11:32:59 +02:00
Mateusz Pusz
2bcc5fa4e5
Small quantity formatting cleanup with clang-format
2019-10-15 11:29:25 +02:00
Mateusz Pusz
040c703461
Scalar constraint added for quantity operators
2019-10-08 21:26:18 +02:00
Mateusz Pusz
458ac0918b
Scalar constraint added to quantity constructor
2019-10-08 21:20:37 +02:00
Mateusz Pusz
4ba818bb78
quantity_cast_impl refactored to use compile time branching rather than concepts
2019-10-08 21:20:06 +02:00
Mateusz Pusz
3f8cee0931
Scalar concept constraints reversed
2019-10-08 21:19:04 +02:00
Mateusz Pusz
2fddb494d3
_t postfix removed from the interface (resolves #9 )
2019-10-04 16:22:49 +02:00
Mateusz Pusz
7c4e5d086a
Merge pull request #17 from jansende/patch-2
...
Optimized floating point unit conversions
2019-10-01 20:08:01 +02:00
Mateusz Pusz
12200f6f40
operator% constrained to integral types only ( resolves #16 )
2019-10-01 16:29:42 +02:00
Jan Sende
a11f5a92b6
Optimized floating point unit conversions
...
- Divisions are now made at compile time.
- Only runtime multiplications are left.
2019-09-30 23:38:33 +02:00
Mateusz Pusz
f373adb42f
Not needed static_assert removed from quantity class template
2019-09-30 09:07:15 +02:00
Mateusz Pusz
f9d6b53b72
[[nodiscard]] added to quantity_cast and DESIGN.md update with the new quantity_cast functionality
2019-09-30 09:05:50 +02:00
Mateusz Pusz
3b07c51f50
Merge pull request #15 from jansende/patch-1
...
Made quantity_cast more versatile
2019-09-30 08:55:39 +02:00
Mateusz Pusz
73b5c7c4ac
{+a} -> T added to a Number concept
2019-09-30 08:51:45 +02:00
Jan Sende
dc85dd84b9
Made quantity_cast more versatile
...
- One can now change the unit type without changing the representation type.
- One can now change the representation type without changing the unit type.
- Had to implement std::common_type<my_value, my_value> to still compile
integration tests. (It implicitly converted to another representation
before.)
2019-09-30 01:45:38 +02:00
Mateusz Pusz
952b19c2ed
bool removed from concepts definitions as gcc-9.1 supports this syntax already
2019-09-28 19:10:06 +02:00
Mateusz Pusz
4b145ea4cf
Den != 0 added as a constrain on ratio type
2019-09-27 23:45:45 +02:00
Mateusz Pusz
1a23d5b69e
Invalid todo comment and depdency on std::ratio removed
2019-09-27 09:41:39 +02:00
Mateusz Pusz
00ed8ad83a
Missing CMake change added to fix the compilation
2019-09-26 23:08:33 +02:00
Mateusz Pusz
2e1ce83024
Downcasting facility refactored so the user does not have to write the boilerplate code anymore
2019-09-26 22:30:57 +02:00
Mateusz Pusz
ad69f338b8
pow<N>() fixed to work with the integral representations
2019-09-24 16:59:45 +02:00
Mateusz Pusz
0cffcf7849
downcasting_traits renamed to downcast_traits
...
- downcasting_traits -> downcast_traits
- downcasting_traits_t -> downcast_traits_t
- downcast_from -> downcast_base_t
- downcast_to removed
2019-09-20 18:36:14 +02:00
Mateusz Pusz
c3d7359ca3
units removed from a std::experimental namespace
2019-09-18 21:55:16 -06:00
Mateusz Pusz
6390eba786
Dimensions comparison improved
2019-09-18 21:24:40 -06:00
Mateusz Pusz
58106618ac
ratio_pow and ratio_sqrt fixed + unit tests added
2019-09-18 18:34:54 -06:00
Mateusz Pusz
2d74b72893
pow() and sqrt() for quantities support added
2019-09-18 17:07:35 -06:00