From 8675542f982471166edf6cd2edc5a8b234b9e7b5 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Mon, 13 Jan 2020 11:15:26 +0100 Subject: [PATCH] README updated to reflect the latest units changes --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 34542080..47ea71a8 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ ```cpp #include -#include -#include +#include #include using namespace units; @@ -25,18 +24,18 @@ int main() { using namespace si::literals; Velocity auto v1 = avg_speed(220km, 2h); - Velocity auto v2 = avg_speed(si::length(140), si::time(2)); + Velocity auto v2 = avg_speed(si::length(140), si::time(2)); Velocity auto v3 = quantity_cast(v2); Velocity auto v4 = quantity_cast(v3); - std::cout << v1 << '\n'; // 110 km/h - std::cout << fmt::format("{}", v2) << '\n'; // 70 mi/h - std::cout << fmt::format("{:%Q in %q}", v3) << '\n'; // 31.2928 in m/s - std::cout << fmt::format("{:%Q}", v4) << '\n'; // 31 + std::cout << v1 << '\n'; // 110 km/h + std::cout << v2 << '\n'; // 70 mi/h + std::cout << v3 << '\n'; // 31.2928 m/s + std::cout << v4 << '\n'; // 31 m/s } ``` -Try it on [Compiler Explorer](https://godbolt.org/z/7pqFV7). +Try it on [Compiler Explorer](https://godbolt.org/z/eMhDQ9). ## Summary @@ -154,7 +153,7 @@ fashion: int main() { using namespace si::literals; - using namespace us::literals; + using namespace international::literals; Velocity auto v1 = avg_speed(220km, 2h); Velocity auto v2 = avg_speed(140mi, 2h);