Commit Graph
91 Commits
Author SHA1 Message Date
Mateusz Pusz 3decaecb52 TODO comments clean-up 2019-12-17 20:15:38 +01:00
Mateusz Pusz fbf3ef8c4f Most of concepts moved to a new file + quantity.h split to smaller pieces 2019-12-12 13:17:31 +01:00
Mateusz Pusz 9d50ea6ab5 CGS case added to avg_speed example 2019-12-11 21:38:44 +01:00
Mateusz Pusz 71f38222ea Implicit conversions fixed 2019-12-11 16:16:05 +01:00
Mateusz Pusz 5a7324596d Resulting unit ratio fixed in arithmetic operations 2019-12-11 13:31:40 +01:00
Mateusz Pusz c3c80fde11 Spaceship support added (resolves #19) 2019-12-11 11:27:51 +01:00
Mateusz Pusz e472fdc348 Most of the operators converted to hidden friends 2019-12-11 10:44:55 +01:00
Mateusz Pusz bc1901f4f0 Text formatting enabled + directory tree refactoring 2019-12-11 08:07:13 +01:00
Mateusz Pusz 8ffc46ba75 CGS support added 2019-12-09 17:19:58 +01:00
Mateusz Pusz 7619a6f831 gcc-10 crash fixed 2019-12-08 21:57:06 +01:00
Mateusz Pusz 6b4220100f quantity_cast refactored
- new version with ToD added
- <ToU, Rep> version removed
2019-12-08 16:24:29 +01:00
Mateusz Pusz 22eda11bea More refactoring
- unknown_unit and unknown_dimension added
- the support for remaining SI units added
2019-12-07 16:30:40 +01:00
Mateusz Pusz f31b26b5e5 Design cleanup
- unknown_unit added
- examples refactored
- base_type renamed to downcast_base_type
- scaled_unit renamed to named_scaled_unit
- detail::reference_unit renamed to scaled_unit
- quantity_test cleanup
2019-12-06 12:18:39 +01:00
Mateusz Pusz c48bfe2098 quantity refactored and quantity_test enabled 2019-12-04 17:46:19 +01:00
Mateusz Pusz 3d2c613dcb quantity operators * and / constrains weaken to one magma 2019-11-16 18:29:32 +01:00
Mateusz Pusz d4976caf1d operator- constraints fixed 2019-11-16 18:28:13 +01:00
Mateusz Pusz 9c6229302d Small code cleanup 2019-11-16 18:27:31 +01:00
Mateusz Pusz 57e464cc99 quantity constraints refactored 2019-11-15 20:20:25 +01:00
Mateusz Pusz 2328a26992 Downcasting support added to quantity_cast (resolves #26) 2019-11-09 14:42:06 +00:00
Mateusz Pusz 4d1e225d9e UnitRep renamed to QuantityRep 2019-11-09 14:16:37 +00:00
Mateusz Pusz 04cbeb841e Disabled prefix/postfix increment/decrement operators (resolves #18) 2019-11-09 14:09:30 +00:00
Mateusz Pusz ad895b4651 Small refactoring of QuantityOf 2019-11-08 14:35:18 +00:00
Mateusz Pusz 9871cf0ed7 UnitRep extended 2019-11-06 21:51:40 +00:00
Mateusz Pusz e4cd4ea8c8 UnitRep concept introduced 2019-11-06 20:17:16 +00:00
Mateusz Pusz b5b2c54fe8 Basic std::fmt support added 2019-11-05 20:05:11 +00:00
Mateusz Pusz 91bcfedf1e Deduced units symbols refactoring started 2019-11-04 06:45:56 +00:00
Mateusz Pusz 7da63eedfd quantity refactoring 2019-11-02 13:58:10 +01:00
Mateusz Pusz 2bde0e62b2 Downcasting facility refactoring 2019-11-02 13:54:43 +01:00
Mateusz Pusz 53720c82b8 fmt support started 2019-10-18 23:50:43 +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 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 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