refactor: iostream.h renamed to ostream.h

This commit is contained in:
Mateusz Pusz committed 2023-06-23 15:03:04 +02:00
1 parent 1d7a566c19
commit 52ce2b21f7
19 files changed
+23 -23

No files matched your search

+2 -2
View File
@@ -39,7 +39,7 @@ performed without sacrificing accuracy. Please see the below example for a quick
```cpp
#include <mp-units/format.h>
#include <mp-units/iostream.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/international/international.h>
#include <mp-units/systems/isq/space_and_time.h>
#include <mp-units/systems/si/si.h>
@@ -76,7 +76,7 @@ int main()
}
```
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/T8bovrqTP)"
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/3q646qrb3)"
!!! note
@@ -50,7 +50,7 @@ have shorter type identifiers, resulting in easier-to-understand error messages
Here is a simple example showing how to deal with such quantities:
```cpp
#include <mp-units/iostream.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/si/si.h>
#include <iostream>
@@ -82,7 +82,7 @@ The code above prints:
A car driving 110 km in 2 h has an average speed of 15.2778 m/s (55 km/h)
```
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/e5x1cnEqP)"
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/W6Ej7aqxj)"
## Easy to understand compilation error messages
@@ -124,7 +124,7 @@ accident.
The previous example can be re-typed using typed quantities in the following way:
```cpp
#include <mp-units/iostream.h>
#include <mp-units/ostream.h>
#include <mp-units/systems/isq/space_and_time.h>
#include <mp-units/systems/si/si.h>
#include <iostream>
@@ -154,7 +154,7 @@ int main()
A car driving 110 km in 2 h has an average speed of 15.2778 m/s (55 km/h)
```
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/je6jabh3o)"
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/98YP8j9b4)"
In case we will accidentally make the same calculation error as before, this time, we will
get a bit longer error message also containing information about the quantity type: