From 5ddbd62ea483dc92e5ef5a37adb12917e3cbc1f5 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 12 Nov 2024 14:19:39 +0100 Subject: [PATCH] feat(example): `is_vector` specialization no longer needed for `si_constants` --- docs/users_guide/examples/si_constants.md | 14 +++----------- example/si_constants.cpp | 4 ---- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/docs/users_guide/examples/si_constants.md b/docs/users_guide/examples/si_constants.md index f5feb153..847520f4 100644 --- a/docs/users_guide/examples/si_constants.md +++ b/docs/users_guide/examples/si_constants.md @@ -16,19 +16,11 @@ work in practice. --8<-- "example/si_constants.cpp:28:40" ``` -As always, we start with the inclusion of all the needed header files. After that, for -the simplicity of this example, we -[hack the character of quantities](../framework_basics/character_of_a_quantity.md#hacking-the-character) -to be able to express vector quantities with simple scalar types. - -```cpp title="si_constants.cpp" linenums="14" ---8<-- "example/si_constants.cpp:42:44" -``` - +As always, we start with the inclusion of all the needed header files. The main part of the example prints all of the SI-defining constants: -```cpp title="si_constants.cpp" linenums="17" ---8<-- "example/si_constants.cpp:45:" +```cpp title="si_constants.cpp" linenums="14" +--8<-- "example/si_constants.cpp:42:" ``` While analyzing the output of this program (provided below), we can easily notice that a direct diff --git a/example/si_constants.cpp b/example/si_constants.cpp index e09588c4..a43779ab 100644 --- a/example/si_constants.cpp +++ b/example/si_constants.cpp @@ -39,10 +39,6 @@ import mp_units; #include #endif -template - requires mp_units::is_scalar -constexpr bool mp_units::is_vector = true; - int main() { using namespace mp_units;