diff --git a/README.md b/README.md index ca04b98c..6b7c0bb9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ using namespace units; -constexpr Velocity AUTO avg_speed(Length auto d, Time auto t) +constexpr Velocity auto avg_speed(Length auto d, Time auto t) { return d / t; } @@ -22,10 +22,10 @@ constexpr Velocity AUTO avg_speed(Length auto d, Time auto t) 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 v3 = quantity_cast(v2); - Velocity AUTO v4 = quantity_cast(v3); + Velocity auto v1 = avg_speed(220km, 2h); + 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 diff --git a/example/hello_units.cpp b/example/hello_units.cpp index 2d049134..2a933e59 100644 --- a/example/hello_units.cpp +++ b/example/hello_units.cpp @@ -26,7 +26,7 @@ using namespace units; -constexpr Velocity AUTO avg_speed(Length auto d, Time auto t) +constexpr Velocity AUTO avg_speed(Length AUTO d, Time AUTO t) { return d / t; }