From dd7bc664c3e53133ba02803d0137f71b44fd5898 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 29 Jun 2023 15:09:19 +0100 Subject: [PATCH] docs: `make_quantity` example added to "Quick Start" chapter --- docs/getting_started/quick_start.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/getting_started/quick_start.md b/docs/getting_started/quick_start.md index 6ca80ccc..5addd99c 100644 --- a/docs/getting_started/quick_start.md +++ b/docs/getting_started/quick_start.md @@ -39,6 +39,18 @@ auto q = 42 * m; why they are opt-in. A user has to explicitly "import" them from a dedicated `unit_symbols` namespace. +In case someone doesn't like the multiply syntax or there is an ambiguity between `operator*` +provided by this and other libraries, a quantity can also be created with a dedicated factory +function: + +```cpp +#include + +using namespace mp_units; + +auto q = make_quantity(42); +``` + ## User-provided unit wrappers