forked from mpusz/mp-units
refactor: iostream.h renamed to ostream.h
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user