diff --git a/example/avg_speed.cpp b/example/avg_speed.cpp index d4c76027..3c2ce2dc 100644 --- a/example/avg_speed.cpp +++ b/example/avg_speed.cpp @@ -51,8 +51,7 @@ constexpr QuantityOf auto avg_speed(QuantityOf auto d, template D, QuantityOf T, QuantityOf V> void print_result(D distance, T duration, V speed) { - using namespace mp_units::si::unit_symbols; - const auto result_in_kmph = value_cast(speed); + const auto result_in_kmph = value_cast / non_si::hour>(speed); std::cout << "Average speed of a car that makes " << distance << " in " << duration << " is " << result_in_kmph << ".\n"; }