mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 02:17:16 +02:00
docs: Compiler Explorer links updated to reflect the systems file tree refactoring
This commit is contained in:
@ -81,7 +81,7 @@ static_assert(10 * km / (5 * km) == 2 * one);
|
|||||||
static_assert(1000 / (1 * s) == 1 * kHz);
|
static_assert(1000 / (1 * s) == 1 * kHz);
|
||||||
```
|
```
|
||||||
|
|
||||||
_Try it on the [Compiler Explorer](https://godbolt.org/z/ox8a8dGTz)._
|
_Try it on the [Compiler Explorer](https://godbolt.org/z/8acPeq743)._
|
||||||
|
|
||||||
This library heavily uses C++20 features (concepts, classes as NTTPs, ...). Thanks to
|
This library heavily uses C++20 features (concepts, classes as NTTPs, ...). Thanks to
|
||||||
them the user gets a powerful but still easy to use interfaces and all unit conversions
|
them the user gets a powerful but still easy to use interfaces and all unit conversions
|
||||||
@ -130,4 +130,4 @@ int main()
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
_Try it on the [Compiler Explorer](https://godbolt.org/z/Pe8ah9WYT)._
|
_Try it on the [Compiler Explorer](https://godbolt.org/z/fsdovTcYh)._
|
||||||
|
@ -56,7 +56,7 @@ Here is a small example of operations possible on scalar quantities:
|
|||||||
static_assert(1000 / (1 * s) == 1 * kHz);
|
static_assert(1000 / (1 * s) == 1 * kHz);
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/ox8a8dGTz)"
|
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/8acPeq743)"
|
||||||
|
|
||||||
|
|
||||||
This library requires some C++20 features ([concepts and constraints](https://en.cppreference.com/w/cpp/language/constraints),
|
This library requires some C++20 features ([concepts and constraints](https://en.cppreference.com/w/cpp/language/constraints),
|
||||||
@ -150,7 +150,7 @@ performed without sacrificing accuracy. Please see the below example for a quick
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/Pe8ah9WYT)"
|
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/fsdovTcYh)"
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ Output:
|
|||||||
Harvard Bridge length = 364.4 smoot (2034.6 ft, 620.14 m) ± 1 εar
|
Harvard Bridge length = 364.4 smoot (2034.6 ft, 620.14 m) ± 1 εar
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/Ee8oGd5dq)"
|
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/zsW1f6Tn1)"
|
||||||
|
|
||||||
??? question "What is `smoot`?"
|
??? question "What is `smoot`?"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ tags:
|
|||||||
|
|
||||||
# `avg_speed`
|
# `avg_speed`
|
||||||
|
|
||||||
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/vvxbMjeof)"
|
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/EYo7879qd)"
|
||||||
|
|
||||||
Let's continue the previous example. This time, our purpose will not be to showcase as many
|
Let's continue the previous example. This time, our purpose will not be to showcase as many
|
||||||
library features as possible, but we will scope on different interfaces one can provide
|
library features as possible, but we will scope on different interfaces one can provide
|
||||||
|
@ -6,7 +6,7 @@ tags:
|
|||||||
|
|
||||||
# `hello_units`
|
# `hello_units`
|
||||||
|
|
||||||
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/d5hhrEsPW)"
|
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/KKGGhKjqn)"
|
||||||
|
|
||||||
This is a really simple example showcasing the features of the **mp-units** library.
|
This is a really simple example showcasing the features of the **mp-units** library.
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ tags:
|
|||||||
|
|
||||||
# `si_constants`
|
# `si_constants`
|
||||||
|
|
||||||
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/bd7Gee1G3)"
|
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/sEqWcchdE)"
|
||||||
|
|
||||||
The next example presents all the seven defining constants of the SI system. We can observe
|
The next example presents all the seven defining constants of the SI system. We can observe
|
||||||
how [Faster-than-lightspeed Constants](../framework_basics/faster_than_lightspeed_constants.md)
|
how [Faster-than-lightspeed Constants](../framework_basics/faster_than_lightspeed_constants.md)
|
||||||
|
@ -114,7 +114,7 @@ The code above prints:
|
|||||||
A car driving 110 km in 2 h has an average speed of 15.28 m/s (55 km/h)
|
A car driving 110 km in 2 h has an average speed of 15.28 m/s (55 km/h)
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/h1nne9eaG)"
|
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/W93ovssda)"
|
||||||
|
|
||||||
|
|
||||||
### User-provided unit wrappers
|
### User-provided unit wrappers
|
||||||
@ -232,7 +232,7 @@ The previous example can be re-typed using typed quantities in the following way
|
|||||||
A car driving 110 km in 2 h has an average speed of 15.28 m/s (55 km/h)
|
A car driving 110 km in 2 h has an average speed of 15.28 m/s (55 km/h)
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/aYGdrWsT6)"
|
!!! example "[Try it on Compiler Explorer](https://godbolt.org/z/MEK1ooEjo)"
|
||||||
|
|
||||||
In case we will accidentally make the same calculation error as before, this time, we will
|
In case we will accidentally make the same calculation error as before, this time, we will
|
||||||
get a bit longer error message, this time also containing information about the quantity type:
|
get a bit longer error message, this time also containing information about the quantity type:
|
||||||
|
Reference in New Issue
Block a user