471 Commits
Author SHA1 Message Date
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 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
Mateusz Pusz 021df4a46f dimension_sqrt and dimension_pow support added 2019-09-18 15:32:22 -06:00
Mateusz Pusz 929a812ec4 cmcstl2 dependency changed to range-v3 0.9.1 2019-09-18 10:29:30 -06:00
Mateusz Pusz 3fcb7c9e91 dim_invert and dim_consolidate cleanup 2019-09-18 06:37:30 -06:00
Mateusz Pusz 32a65a7405 Support for derived dimensions in exp added 2019-09-18 06:36:52 -06:00
Mateusz Pusz 90a7dbe3fa quantity_cast<U, Rep> support added 2019-09-16 00:21:58 -06:00
Mateusz Pusz 9953acb2ab Missing concept added to type_list 2019-09-15 17:33:46 -06:00
Mateusz Pusz 022783df74 Extra typename usage removed from ratio.h 2019-09-13 08:52:22 +02:00
Mateusz Pusz bebaa5482c QuantityOf concept added 2019-09-10 22:33:54 +02:00
Mateusz Pusz bce17a8476 Fractional dimension exponents support added 2019-09-10 21:20:32 +02:00
Mateusz Pusz 8587d5350d Expects changed to not do anything in a Release build 2019-09-10 20:23:10 +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 70a90b4ae0 config.h support removed as it causes issues with compiler-explorer 2019-09-10 18:59:23 +02:00
Mateusz Pusz dfba6e8f85 Unit check for positive ratio improved 2019-09-09 23:02:07 +02:00
Mateusz Pusz 3bcd80681e base_dimension is provided as a const& to the exp type 2019-09-06 10:16:19 +02:00
Mateusz Pusz 33b6fa9f3f Concepts removed from unit related utilities to increase compile-times 2019-08-08 22:31:22 +02:00