diff --git a/docs/getting_started/faq.md b/docs/getting_started/faq.md index f70c9310..a3dd5123 100644 --- a/docs/getting_started/faq.md +++ b/docs/getting_started/faq.md @@ -156,7 +156,7 @@ magnitudes. In that case, you may end up with a really small or a huge floating- in losing lots of precision. Returning a dimensionless quantity from such cases allows us to benefit from all the properties of scaled units and is consistent with the rest of the library. -!!! info +!!! note More information on the current design can be found in [the Dimensionless Quantities chapter](../users_guide/framework_basics/dimensionless_quantities.md). @@ -171,7 +171,7 @@ standards specify Unicode symbols as the official unit names for some quantities As **mp-units** library will be proposed for standardization as a part of the C++ Standard Library we have to obey the rules and be consistent with ISO specifications. -!!! info +!!! note We do understand engineering reality and the constraints of some environments. This is why the library has the option of ASCII-only Quantity Symbols. @@ -210,7 +210,7 @@ This is why our projects have two entry points: - _./src/CMakeLists.txt_ contains only a pure library definition and should be used by the customers that prefer to use CMake's `add_subdirectory()` to handle the dependencies. -!!! info +!!! note For more details on this please refer to the [CMake + Conan: 3 Years Later - Mateusz Pusz](https://youtu.be/mrSwJBJ-0z8?t=1931) lecture that Mateusz Pusz provided at the C++Now 2021 conference. diff --git a/docs/getting_started/installation_and_usage.md b/docs/getting_started/installation_and_usage.md index de6cbf0c..350a1cc9 100644 --- a/docs/getting_started/installation_and_usage.md +++ b/docs/getting_started/installation_and_usage.md @@ -124,7 +124,7 @@ generators. For example: tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" ``` -!!! note +!!! info _~/.conan2/global.conf_ file may also set `tools.cmake.cmake_layout:build_folder_vars` which [makes working with several compilers or build configurations easier](https://docs.conan.io/2/reference/tools/cmake/cmake_layout.html#multi-setting-option-cmake-layout). @@ -222,7 +222,7 @@ cmake .. -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE= cmake --build . --config Release ``` -!!! note +!!! tip In case you can't use CMake 3.23 but you have access to CMake 3.20 or later, you can append `-c tools.cmake.cmaketoolchain.presets:max_schema_version=2` to the `conan install` command @@ -234,7 +234,7 @@ cmake --build . --config Release There are many different ways of installing/reusing **mp-units** in your project. Below we mention only a few of many options possible. -!!! info +!!! important The easiest and most recommended way to obtain **mp-units** is with the Conan package manager. See [Conan + CMake (release)](#conan-cmake-release) for a detailed instruction. diff --git a/docs/getting_started/introduction.md b/docs/getting_started/introduction.md index 106d72ba..51e17cb9 100644 --- a/docs/getting_started/introduction.md +++ b/docs/getting_started/introduction.md @@ -6,7 +6,7 @@ manipulation. The initial versions of the library were inspired by the but with each release, the interfaces diverged from the original to provide a better user experience. -!!! note +!!! info A brief introduction to the library's interfaces and the rationale for changes in the version 2.0 of **mp-units** were provided in detail by [Mateusz Pusz](https://github.com/mpusz) in the @@ -36,7 +36,7 @@ To achieve this goal, several techniques are applied: - [usage of expression templates to improve the readability of generated types](../users_guide/framework_basics/interface_introduction.md#expression-templates), - limiting the number of template arguments to the bare minimum. -!!! note +!!! important In many generic C++ libraries compile-time errors do not happen often. It is hard to break `std::string` or `std::vector` in a way it won't compile with a huge error diff --git a/docs/getting_started/quick_start.md b/docs/getting_started/quick_start.md index 8d9736e4..923482f1 100644 --- a/docs/getting_started/quick_start.md +++ b/docs/getting_started/quick_start.md @@ -33,7 +33,7 @@ using namespace mp_units::si::unit_symbols; quantity q = 42 * m; ``` -!!! note +!!! tip Unit symbols introduce a lot of short identifiers into the current namespace, and that is why they are opt-in. A user has to explicitly "import" them from a dedicated `unit_symbols` diff --git a/docs/index.md b/docs/index.md index 0ad688a6..9a376e5e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,7 +7,7 @@ performance, and developer experience. The library source code is hosted on [GitHub](https://github.com/mpusz/mp-units) with a permissive [MIT license](https://github.com/mpusz/units/blob/master/LICENSE.md). -!!! info "Help needed!" +!!! important "Help needed!" The **mp-units** library might be the subject of ISO standardization for C++29. More on this can be found in the ISO C++ proposal [P1935](https://wg21.link/p1935). We are actively looking for diff --git a/docs/users_guide/examples/tags_index.md b/docs/users_guide/examples/tags_index.md index d1224ae1..f8e60316 100644 --- a/docs/users_guide/examples/tags_index.md +++ b/docs/users_guide/examples/tags_index.md @@ -1,6 +1,6 @@ # Tags Index -!!! note +!!! tip All usage examples in this chapter are categorized with appropriate tags to simplify navigation and search of relevant code. You can either read all the examples one-by-one in the order provided by diff --git a/docs/users_guide/framework_basics/basic_concepts.md b/docs/users_guide/framework_basics/basic_concepts.md index 00aee5ba..adc98a27 100644 --- a/docs/users_guide/framework_basics/basic_concepts.md +++ b/docs/users_guide/framework_basics/basic_concepts.md @@ -137,7 +137,7 @@ including: `QuantitySpecOf` concept is satisfied when both arguments satisfy a [`QuantitySpec`](#QuantitySpec) concept and when `T` is implicitly convertible to `V`. -??? note "More details" +??? info "More details" Additionally: @@ -253,7 +253,7 @@ units can be passed as an argument to a `prefixed_unit` class template. `UnitOf` concept is satisfied for all units `T` matching an [`AssociatedUnit`](#AssociatedUnit) concept with an associated quantity type implicitly convertible to `V`. -??? note "More details" +??? info "More details" Additionally, the kind of `V` and the kind of quantity type associated with `T` must be the same, or the quantity type associated with `T` may not be derived from the kind of `V`. diff --git a/docs/users_guide/framework_basics/dimensionless_quantities.md b/docs/users_guide/framework_basics/dimensionless_quantities.md index 32ff7b8f..1cdddf19 100644 --- a/docs/users_guide/framework_basics/dimensionless_quantities.md +++ b/docs/users_guide/framework_basics/dimensionless_quantities.md @@ -138,7 +138,7 @@ quantities deriving from them. As we observed above, the most common unit for dimensionless quantities is `one`. It has the ratio of `1` and does not output any textual symbol. -!!! note +!!! important A unit `one` is special in the entire type system of units as it is considered to be [an identity operand in the unit expression templates](interface_introduction.md#identities). diff --git a/docs/users_guide/framework_basics/interface_introduction.md b/docs/users_guide/framework_basics/interface_introduction.md index 6b034a4b..017859e6 100644 --- a/docs/users_guide/framework_basics/interface_introduction.md +++ b/docs/users_guide/framework_basics/interface_introduction.md @@ -16,7 +16,7 @@ behind this is that: - Users always work with objects and never have to spell such a type name. - The types appear in the compilation errors and during debugging. -!!! info +!!! important To improve compiler errors' readability and make it easier to correlate them with a user's written code, a new idiom in the library is to use the same identifier for @@ -133,7 +133,7 @@ type = class mp_units::quantity` specifier. For example, to express any quantity of length, we need to type `kind_of`. -!!! note +!!! important `isq::length` and `kind_of` are two different things. @@ -380,7 +380,7 @@ static_assert(!same_type / isq::time, kind_of / isq::time, isq::length / isq::time>); ``` -!!! note +!!! info Only a root quantity from the hierarchy tree or the one marked with `is_kind` specifier in the `quantity_spec` definition can be put as a template parameter to the `kind_of` diff --git a/docs/users_guide/framework_basics/systems_of_units.md b/docs/users_guide/framework_basics/systems_of_units.md index c6f77fa8..50965fe1 100644 --- a/docs/users_guide/framework_basics/systems_of_units.md +++ b/docs/users_guide/framework_basics/systems_of_units.md @@ -29,7 +29,7 @@ previous chapter) with a unit that is used to express it: inline constexpr struct metre : named_unit<"m", kind_of> {} metre; ``` -!!! note +!!! important The `kind_of` above states explicitly that this unit has an associated quantity kind. In other words, `si::metre` (and scaled units based diff --git a/docs/users_guide/framework_basics/text_output.md b/docs/users_guide/framework_basics/text_output.md index 951441a8..1439f17e 100644 --- a/docs/users_guide/framework_basics/text_output.md +++ b/docs/users_guide/framework_basics/text_output.md @@ -37,7 +37,7 @@ The text output will always print the [value of a quantity](../../appendix/gloss typically followed by a space and then the symbol of a [unit](../../appendix/glossary.md#unit) associated with this quantity. -!!! note +!!! important Remember that when we deal with a quantity of an "unknown" `auto` type, it is a good practice to always [convert the unit to the expected one](value_conversions.md#value-conversions) diff --git a/docs/users_guide/framework_basics/the_affine_space.md b/docs/users_guide/framework_basics/the_affine_space.md index 674f2658..db5aaaf8 100644 --- a/docs/users_guide/framework_basics/the_affine_space.md +++ b/docs/users_guide/framework_basics/the_affine_space.md @@ -29,7 +29,7 @@ Here are the primary operations one can do in the affine space: - _vector_ + _point_ -> _point_ - _point_ - _vector_ -> _point_ -!!! note +!!! important It is not possible to: @@ -337,7 +337,7 @@ The following operations are not allowed in the affine space: - How to subtract a point on our trip to CppCon measured relatively to our home location from a point measured relative to the center of the Solar System? -!!! note +!!! important The usage of `quantity_point` and affine space types in general, improves expressiveness and type-safety of the code we write. diff --git a/docs/users_guide/framework_basics/value_conversions.md b/docs/users_guide/framework_basics/value_conversions.md index 41781eee..d2bd47ee 100644 --- a/docs/users_guide/framework_basics/value_conversions.md +++ b/docs/users_guide/framework_basics/value_conversions.md @@ -12,7 +12,7 @@ The second line above converts the current quantity to the one expressed in metr contents. The third line converts the quantity expressed in kilometres into the one measured in metres. -!!! note +!!! important It is always assumed that one can convert a quantity into another one with a unit of a higher resolution. There is no protection against overflow of the representation type. In case the target