mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 11:24:27 +02:00
refactor: 💥 header files with the entire system definitions moved up in the directory tree
This commit is contained in:
@@ -32,7 +32,7 @@ Here is a small example of operations possible on scalar quantities:
|
||||
=== "Header files"
|
||||
|
||||
```cpp
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
|
||||
using namespace mp_units;
|
||||
using namespace mp_units::si::unit_symbols;
|
||||
@@ -111,9 +111,9 @@ performed without sacrificing accuracy. Please see the below example for a quick
|
||||
```cpp
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/ostream.h>
|
||||
#include <mp-units/systems/international/international.h>
|
||||
#include <mp-units/systems/isq/isq.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/international.h>
|
||||
#include <mp-units/systems/isq.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <format>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
@@ -33,7 +33,7 @@ a number with a predefined unit:
|
||||
=== "Header files"
|
||||
|
||||
```cpp
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
|
||||
using namespace mp_units;
|
||||
|
||||
@@ -59,7 +59,7 @@ a number with a predefined unit:
|
||||
=== "Header files"
|
||||
|
||||
```cpp
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
|
||||
using namespace mp_units;
|
||||
|
||||
@@ -83,7 +83,7 @@ The same can be obtained using optional unit symbols:
|
||||
=== "Header files"
|
||||
|
||||
```cpp
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
|
||||
using namespace mp_units;
|
||||
using namespace mp_units::si::unit_symbols;
|
||||
@@ -193,7 +193,7 @@ Quantities of the same kind can be added, subtracted, and compared to each other
|
||||
=== "Header files"
|
||||
|
||||
```cpp
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
|
||||
using namespace mp_units;
|
||||
using namespace mp_units::si::unit_symbols;
|
||||
@@ -249,8 +249,8 @@ This introduces an additional type-safety.
|
||||
|
||||
```cpp
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/usc/usc.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <mp-units/systems/usc.h>
|
||||
#include <print>
|
||||
|
||||
int main()
|
||||
|
@@ -47,8 +47,8 @@ The library source code is hosted on [GitHub](https://github.com/mpusz/mp-units)
|
||||
|
||||
```cpp
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/usc/usc.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <mp-units/systems/usc.h>
|
||||
#include <print>
|
||||
|
||||
using namespace mp_units;
|
||||
|
@@ -84,7 +84,7 @@ Here is a simple example showing how to deal with such quantities:
|
||||
|
||||
```cpp
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <print>
|
||||
|
||||
using namespace mp_units;
|
||||
@@ -203,8 +203,8 @@ The previous example can be re-typed using typed quantities in the following way
|
||||
|
||||
```cpp
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/systems/isq/isq.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/isq.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <print>
|
||||
|
||||
using namespace mp_units;
|
||||
@@ -373,7 +373,7 @@ Let's see another example:
|
||||
|
||||
```cpp hl_lines="42"
|
||||
#include <mp-units/math.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <numbers>
|
||||
|
||||
using namespace mp_units;
|
||||
@@ -422,8 +422,8 @@ Let's see another example:
|
||||
|
||||
```cpp hl_lines="53 54 55"
|
||||
#include <mp-units/math.h>
|
||||
#include <mp-units/systems/isq/isq.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/isq.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <numbers>
|
||||
|
||||
using namespace mp_units;
|
||||
|
@@ -57,9 +57,9 @@ your code using **mp-units**:
|
||||
```cpp
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/ostream.h>
|
||||
#include <mp-units/systems/international/international.h>
|
||||
#include <mp-units/systems/isq/isq.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/international.h>
|
||||
#include <mp-units/systems/isq.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
|
||||
@@ -77,9 +77,9 @@ your code using **mp-units**:
|
||||
```cpp
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/ostream.h>
|
||||
#include <mp-units/systems/international/international.h>
|
||||
#include <mp-units/systems/isq/isq.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/international.h>
|
||||
#include <mp-units/systems/isq.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#include <fmt/format.h>
|
||||
#include <iostream>
|
||||
|
||||
@@ -102,9 +102,9 @@ your code using **mp-units**:
|
||||
#else
|
||||
#include <mp-units/format.h>
|
||||
#include <mp-units/ostream.h>
|
||||
#include <mp-units/systems/international/international.h>
|
||||
#include <mp-units/systems/isq/isq.h>
|
||||
#include <mp-units/systems/si/si.h>
|
||||
#include <mp-units/systems/international.h>
|
||||
#include <mp-units/systems/isq.h>
|
||||
#include <mp-units/systems/si.h>
|
||||
#endif
|
||||
|
||||
// ...
|
||||
|
Reference in New Issue
Block a user