docs: "you" replaced to "we" in many places

This commit is contained in:
Mateusz Pusz
2023-10-25 21:27:01 +02:00
parent 1f14184ac3
commit 6c28d743db
7 changed files with 24 additions and 23 deletions

View File

@@ -80,4 +80,4 @@ int main()
!!! note
You can find more code examples in the [Examples](../users_guide/examples/tags_index.md) chapter.
More code examples can be found in the [Examples](../users_guide/examples/tags_index.md) chapter.

View File

@@ -37,8 +37,8 @@ Many reasons make UDLs a poor choice for a physical units library:
to specify which one to use in case both namespaces are "imported" with using directives.
5. Another bad property of UDLs is that they do not compose. A coherent unit of angular momentum would
have a UDL specified as `_q_kg_m2_per_s`. Now imagine that you want to make every possible user happy.
How many variations of that unit would you predefine for differently scaled versions of all unit
have a UDL specified as `_q_kg_m2_per_s`. Now imagine that we want to make every possible user happy.
How many variations of that unit would we predefine for differently scaled versions of all unit
ingredients?
6. UDLs are also really expensive to define and specify. Typically, for each unit, we need two
@@ -124,8 +124,8 @@ it might be either a quantity or a fundamental type. If we want to raise such a
must use `units::pow` or `std::pow` depending on the resulting type. Those are only a few issues related
to such an approach.
Moreover, suppose you divide quantities of the same dimension but with units of significantly different
magnitudes. In that case, you may end up with a really small or a huge floating-point value, which may result
Moreover, suppose we divide quantities of the same dimension but with units of significantly different
magnitudes. In that case, we may end up with a really small or a huge floating-point value, which may result
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.
@@ -175,7 +175,7 @@ we have to obey the rules and be consistent with ISO specifications.
has the option of [ASCII-only Quantity Symbols](../users_guide/framework_basics/text_output.md#unit-symbol-formatting).
## Why don't you have CMake options to disable the building of tests and examples?
## Why don't we have CMake options to disable the building of tests and examples?
Over time, many people provided PRs proposing adding options to build tests and examples conditionally.
Here are a few examples:

View File

@@ -67,7 +67,7 @@ This repository contains three independent CMake-based projects:
that prefer to use CMake's `add_subdirectory()` to handle the dependencies.
To learn more about the rationale, please check our
[FAQ](faq.md#why-dont-you-have-cmake-options-to-disable-building-of-tests-and-examples).
[FAQ](faq.md#why-dont-we-have-cmake-options-to-disable-building-of-tests-and-examples).
## Obtaining Dependencies
@@ -107,13 +107,13 @@ tools.build:compiler_executables={"c": "gcc-12", "cpp": "g++-12"}
!!! tip "Setting the language version"
Please note that the **mp-units** library requires at least C++20 to be set in a Conan profile
or forced via the Conan command line. If you do the former, you will not need to provide
`-s compiler.cppstd=20` every time you run a Conan command line (as provided in the command
or forced via the Conan command line. If we do the former, we will not need to provide
`-s compiler.cppstd=20` every time we run a Conan command line (as provided in the command
line instructions below).
!!! tip "Using Ninja as a CMake generator for Conan"
It is highly recommended to set Ninja as a CMake generator for Conan. To do so, you should
It is highly recommended to set Ninja as a CMake generator for Conan. To do so, we should
create a _~/.conan2/global.conf_ file that will set `tools.cmake.cmaketoolchain:generator`
to one of the Ninja generators. For example:
@@ -132,7 +132,7 @@ tools.build:compiler_executables={"c": "gcc-12", "cpp": "g++-12"}
tools.cmake.cmake_layout:build_folder_vars=["settings.compiler", "settings.compiler.version", "settings.compiler.cppstd"]
```
In such a case, you will need to use a configuration-specific preset name in the Conan instructions
In such a case, we will need to use a configuration-specific preset name in the Conan instructions
provided below rather than just `conan-default` and `conan-release`
(e.g. `conan-gcc-13-23` and `conan-gcc-13-23-release`)
@@ -366,7 +366,8 @@ with the following differences:
### Install
In case you don't want to use Conan in your project and just want to install the **mp-units**
library on your file system and use `find_package(mp-units)` from another repository to find it; it is enough to perform the following steps:
library on your file system and use `find_package(mp-units)` from another repository to find it;
it is enough to perform the following steps:
```shell
conan install . -pr <your_conan_profile> -s compiler.cppstd=20 -b=missing

View File

@@ -169,7 +169,7 @@ associated with this quantity type.
as a vector or tensor quantity representation type.
To enable the usage of a user-defined type as a representation type for vector or tensor quantities,
you need to provide a partial specialization of `is_vector` or `is_tensor` customization points.
we need to provide a partial specialization of `is_vector` or `is_tensor` customization points.
For example, here is how it can be done for the [P1385](https://wg21.link/p1385) types:
@@ -223,12 +223,12 @@ either:
## Hacking the character
Sometimes you want to use a vector quantity, but you don't care about its direction. For example,
the standard gravity acceleration constant always points down, so you might not care about this
in a particular scenario. In such a case, you may want to "hack" the library to allow scalar types
Sometimes we want to use a vector quantity, but we don't care about its direction. For example,
the standard gravity acceleration constant always points down, so we might not care about this
in a particular scenario. In such a case, we may want to "hack" the library to allow scalar types
to be used as a representation type for scalar quantities.
For example, you can do the following:
For example, we can do the following:
```cpp
template<class T>

View File

@@ -55,7 +55,7 @@ possible. For example, to create a quantity with a unit of speed, one may write:
quantity<si::metre / si::second> q;
```
In case you use such an unit often and would prefer to have a handy helper for it, you can
In case we use such an unit often and would prefer to have a handy helper for it, we can
always do something like this:
```cpp

View File

@@ -116,9 +116,9 @@ error: could not convert 'mp_units::operator*<si::metre(), double, si::second(),
## Typed quantities
Simple mode is all about and just about units. In case you care about a specific quantity type,
**typed quantities** should be preferred. With this mode, for example, you can specify if you
deal with `width`, `height`, or `radius` and ensure you will not assign one to another by
Simple mode is all about and just about units. In case we care about a specific quantity type,
**typed quantities** should be preferred. With this mode, for example, we can specify if we
deal with `width`, `height`, or `radius` and ensure we will not assign one to another by
accident.
The previous example can be re-typed using typed quantities in the following way:

View File

@@ -174,8 +174,8 @@ std::println("|{:*^10}|", 123 * m); // |**123 m***|
!!! note
[`std::println` is a C++23 facility](https://en.cppreference.com/w/cpp/io/print). In case you
do not have access to C++23, you can obtain the same output with:
[`std::println` is a C++23 facility](https://en.cppreference.com/w/cpp/io/print). In case we
do not have access to C++23, we can obtain the same output with:
```cpp
std::cout << std::format("<format-string>\n", <format-args>);