Mateusz Pusz
76a9e0ff6e
refactor(example): hello_units refactored to not use auto
2023-09-13 08:58:38 +02:00
Mateusz Pusz
ae92b49775
refactor: op[U] for quantity and quantity_point replaced with .in(U)
...
Resolves #469
2023-08-23 16:46:15 +02:00
Mateusz Pusz
60a564a867
refactor(example): simpler header files used
2023-07-11 19:48:22 +02:00
Mateusz Pusz
52ce2b21f7
refactor: iostream.h renamed to ostream.h
2023-06-23 15:03:04 +02:00
Mateusz Pusz
46a4999d3b
docs: hello_units example documentation added
2023-06-22 18:22:41 +02:00
Mateusz Pusz
ba1f58af76
refactor: All the macros refactored to have MP_UNITS_ prefix
2023-06-21 18:05:21 +02:00
Mateusz Pusz
8c54bbdc9a
refactor(example): hello_units example changed to better reflect the code in README
2023-06-16 10:26:34 +03:00
Mateusz Pusz
561fbf7c93
merge branch master
2023-05-26 13:53:52 +02:00
Mateusz Pusz
7d9ae3ec31
refactor: mp_units subdirectory renamed to mp-units
2023-05-25 12:47:10 +02:00
Mateusz Pusz
e98215c347
refactor: examples refactored to benefit from the latest features
2023-02-14 12:58:54 +01:00
Mateusz Pusz
859bc20fdc
refactor: all examples refactored to use a simplified quantity creation
2023-02-08 21:47:48 -08:00
Mateusz Pusz
0cebb68e2e
fix: broken concept names fixed
2023-02-03 16:58:33 +01:00
Mateusz Pusz
83aee04da0
refactor: quantity_io.h renamed to iostream.h
2023-02-03 16:57:48 +01:00
Mateusz Pusz
b4f47c3fef
feat: value_cast support added
...
Resolves #239 and #120
2023-02-03 11:08:13 +01:00
Mateusz Pusz
2cf736a1e6
feat: preventing possible future units crash when using namespace std;
...
Resolves #317
2022-12-29 20:18:48 +01:00
Mateusz Pusz
6b72dd39c1
refactor: headers with system definitions moved to _systems_ subdirectory
2022-12-29 19:27:54 +01:00
Mateusz Pusz
97da55edfa
refactor: the rest of the systems refactored for V2
2022-12-29 18:59:10 +01:00
Mateusz Pusz
858cbb472f
refactor: First examples refactored to a new quantity creation syntax
2022-12-22 18:06:20 +01:00
Mateusz Pusz
92c70f1a4e
feat: quantity_spec support added
2022-12-16 18:15:48 +01:00
Mateusz Pusz
e7fff94d7c
refactor(example): hello_units refactored
2022-11-30 18:36:16 +01:00
Mateusz Pusz
8d711cdf8e
fix: hello_units reverted to the original state
2022-09-08 19:21:47 +02:00
Mateusz Pusz
daf97a3a86
feat: initial very dirty version of V2 framework
2022-09-08 19:11:45 +02:00
Mateusz Pusz
b221dace3f
style: clang-format applied to the remaining files
2022-04-02 21:36:42 +02:00
Mateusz Pusz
b1bd4cab2d
feat: std::format support for compliant compilers added
2021-09-20 15:01:58 +02:00
Mateusz Pusz
2c8c6c2e98
refactor: quantity cration helpers are not opt-out rather than opt-in
...
Resolves #277
2021-05-09 15:52:20 +02:00
Mateusz Pusz
70bff31d06
feat: quantity aliases support addded
2021-04-15 19:13:25 +02:00
Mateusz Pusz
1f80c57fad
refactor: hello_units fixed to provide literals and references preprocessor defines explicitly
2021-04-06 16:36:52 +02:00
Mateusz Pusz
b982921d27
refactor: References are now guarded UNITS_REFERENCES with (ON by default) + examples duplicated to subdirectories
...
Now References can be disabled to meassure a compile time impact. Also the same examples are now provided in two subdirectories to be able to easily compare the pros and cons of every quantity construction technique.
2021-04-06 15:57:28 +02:00
Mateusz Pusz
c3659dbb47
refactor: UNITS_UDLS renamed to UNITS_LITERALS
...
Also now the existence of the preprocessor flag is enough to trigger the feature (`#ifdef` instead of `#if`)
2021-04-06 13:33:27 +02:00
Mateusz Pusz
1a5b4fc85e
refactor: UDLs support switched off by default
2021-04-02 18:56:28 +02:00
Mateusz Pusz
37cfc53d1d
refactor: IWYU applied to the source files
...
`alternative_namespaces` examples left out as I consider them a subject for removal in the nearest future.
2021-03-30 13:21:05 +02:00
Johel Ernesto Guerrero Peña
0b87e7c99c
refactor!: require explicit number for references
...
Addresses:
- https://github.com/mpusz/units/pull/261#discussion_r596651065
- https://github.com/mpusz/units/pull/261#discussion_r596664550
- https://github.com/mpusz/units/pull/261#discussion_r597132294
2021-03-18 22:37:25 +01:00
Johel Ernesto Guerrero Peña
018c5837f9
refactor: rename unit_constants to references
...
Addresses https://github.com/mpusz/units/pull/261#discussion_r596663522 .
2021-03-18 22:37:25 +01:00
Mateusz Pusz
bbbb77286c
refactor: physical replaced with isq
...
Refers to #249
2021-03-16 12:03:25 +01:00
Mateusz Pusz
23720d055e
refactor: Refactored the library file tree
...
Resolves #249
2021-03-16 09:32:28 +01:00
Mateusz Pusz
dd2079055d
feat: hello_units example updated with the latest changes
2020-12-29 11:46:27 +01:00
Mateusz Pusz
cff718301c
refactor: quantity_io added
2020-12-28 15:18:36 +01:00
Mateusz Pusz
d4d23847d8
refactor: DOWNCAST_MODE renamed to UNITS_DOWNCAST_MODE
2020-09-13 18:45:46 +02:00
Mateusz Pusz
6e510b3a2a
refactor: modules-like behavior for systems removed to improve broken compile-time
...
Reffers to #32
2020-09-13 00:11:02 +02:00
Mateusz Pusz
2a56438f1c
refactor: file tree with systems defninitions refactored to limit ODR issues
...
Relates to #32 as with this commit we created something like modules for derived quantities
2020-09-11 18:11:25 +02:00
Mateusz Pusz
79558a6d72
refactor: systems defined in terms of SI moved under si namespace
2020-09-10 17:14:33 +02:00
Mateusz Pusz
9cd0cb4105
feat: two argument explicit cast support added
2020-09-10 13:01:38 +02:00
Mateusz Pusz
9527b39005
refactor: 💥 q_* UDL renamed to _q_*
...
We had some fun exploring the STD UDLs for potential collisions,
we have learnt our lesson and know how to proceed.
Now is high time to start behaving and obeying C++ rules.
2020-09-09 19:20:35 +02:00
Mateusz Pusz
4bb51586dc
refactor: got rid of gcc-9 backlog
...
BREAKING CHANGE: gcc-9.3 no longer supported
2020-09-08 13:09:34 +02:00
Mateusz Pusz
ce301748dd
Velocity renamed to Speed ( resolves #103 )
2020-05-10 17:31:47 +02:00
Mateusz Pusz
7e935a4108
Physical units put in the physical namespace (I am sorry)
2020-05-08 22:39:24 +02:00
Mateusz Pusz
18620044c5
All UDLs are now prefixed with q_
2020-02-17 15:56:06 +01:00
Andy Little
024f5a9c83
change const order
...
move in,ft,fathom,ft2,ft3,mph from us to international namespace
TODO distinguish units with different names for same values
2020-01-12 21:34:36 +01:00
Andy Little
283e9d81a3
Split the various non-si length units into their own namespaces.
...
new namespaces are
international ( combination of us and imperial + Canada etc)
iau (https://www.iau.org/
imperial ( old imperial units)
typographical ( for sizes of printing fonts etc)
These namespace are based on some research , mainly on wikipedia.
Look in src/include/units/physical/si/length.h to see links to see the references to documentation justifying the change.
Unfortunately there are 3 foot units for example, an old imperial version, an old us version and an international version, which is more recent and attempts to unify the two previous ones. All versions have slight changes in value, so I opted to use the international version
The main change in the layout is that inch,foot and yard have been moved from us to international.
With this modification, I also modified the physical/us/area.hpp, volume.hpp and volume.hpp headers to refer to the international units.
This may not be correct, but if the modified us::foot (rather than international foot is used as a basis for these units, then
there is a ratio integer overflow during compilation, probably due to taking 3rd power of a ratio. After this commit. I will try to show that on another branch.
2020-01-12 21:34:36 +01:00
Mateusz Pusz
80a13b1a94
US system isolated from SI
2019-12-17 12:29:19 +01:00