Mateusz Pusz
fa2bdd1e08
More 'todo' -> 'TODO' changes
2019-10-15 21:20:01 +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
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
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
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
90a7dbe3fa
quantity_cast<U, Rep> support added
2019-09-16 00:21:58 -06:00
Mateusz Pusz
bebaa5482c
QuantityOf concept added
2019-09-10 22:33:54 +02:00
Mateusz Pusz
497a13da1a
Dependency on gsl-lite removed as it causes issues with compiler-explorer
2019-09-10 20:07:48 +02:00
Mateusz Pusz
eb5ff0bf99
cmcstl2 library updated to 2019.08.07
2019-08-08 13:49:51 +02:00
Mateusz Pusz
9452cf5f3c
Concepts usage removed from deduced template arguments and partial specializations
2019-08-06 10:35:43 +02:00
Mateusz Pusz
9c979fc03a
Missing op*() added
2019-08-05 18:22:53 +02:00
Mateusz Pusz
98203afa29
units moved to std::experimental namespace
2019-07-24 11:58:15 +02:00
Mateusz Pusz
eeb4c9c951
Dimension template parameter removed from quantity
2019-07-19 13:49:49 +02:00
Mateusz Pusz
03a22cba2a
upcasting renamed to downcasting
2019-07-18 23:24:24 +02:00
Mateusz Pusz
9c0f2c6878
Custom ratio type implemented
2019-05-28 16:17:48 +02:00
Mateusz Pusz
7bcc5c7b0b
common_ratio refactored
2019-05-28 15:01:50 +02:00
Mateusz Pusz
4b6a7ebb39
Down with typename
2019-05-18 13:19:23 +02:00
Mateusz Pusz
d75377ccaf
std::decay_t replaced with std::remove_cvref_t
2019-05-18 13:19:23 +02:00
Mateusz Pusz
1bbbd02f1c
Concepts workaround added to operator/()
2019-05-08 20:43:52 -06:00
Mateusz Pusz
85ab642fc4
Scalar concept added
2019-05-08 19:56:24 -06:00
Mateusz Pusz
e9d1ae2719
Concepts-related hacks added to import them to std namespace
2019-05-08 09:05:31 -06:00
Mateusz Pusz
cf2370b8fe
Limited number of places where common_type is being used on quantities
...
For some specific mathematical types different type might be returned from division, mulitplication, substraction, etc.
std::common_type<> does not have an information which operation is being performed. It is much better to just get
the actual result of specific operation.
2019-05-07 21:03:58 -06:00
Mateusz Pusz
cdf9f929c3
Refactoring part of quantity interface (similar changes applied to the rest of functions make gcc crash)
2019-05-07 17:39:21 -06:00
Mateusz Pusz
0e36a6025f
tools.h spread to multiple files
2019-05-07 08:25:18 -06:00
Mateusz Pusz
0d68efdcd7
quantity_cast fixed
2019-04-16 10:38:16 +02:00
Mateusz Pusz
ed964292c7
quantity_cast() made constexpr
2019-04-16 10:36:07 +02:00
Mateusz Pusz
adcd1e2f1b
one() added to quantity_values and quantity
2019-04-11 20:54:27 +01:00
Mateusz Pusz
d78508a02f
Refactored units definitions, added the remaining SI base units, refactored header includes
2019-04-09 21:31:09 +01:00
Mateusz Pusz
f94a7b92ea
GSL preconditions added (to be replaced with C++20 Contracts)
2019-04-05 17:46:01 +02:00
Mateusz Pusz
6646051e65
Hand written concepts replaced with Casey Carter's repository
2019-04-05 17:43:42 +02:00
Mateusz Pusz
776c91cf64
Compilation issues fixed
2019-01-14 19:54:19 +01:00
Mateusz Pusz
925239cb31
Small constraints cleanup
2019-01-14 19:38:51 +01:00
Mateusz Pusz
c997208fa7
[[nodiscard]] added
2019-01-14 19:37:25 +01:00
Mateusz Pusz
722402f240
noexcept added to zero(), min(), and max() according to P0972
2018-12-01 21:53:56 +01:00
Mateusz Pusz
ee7518d0a1
dimension_traits and unit_traits merged as upcasting_traits
2018-11-17 12:39:45 +01:00
Mateusz Pusz
e866985668
Strong units support added
2018-11-14 22:36:02 +01:00
Mateusz Pusz
7205dc2cb9
Strong dimensions support added
2018-11-14 22:14:44 +01:00