diff --git a/example/example.cpp b/example/example.cpp index c5c1b03d..c1716594 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -37,8 +37,8 @@ template void example_1(V v, T t) { const units::Length AUTO distance = v * t; - std::cout << "A car driving " << v.count() << " km/h in a time of " << t.count() << " minutes will pass " - << units::quantity_cast>(distance).count() << " metres.\n"; + std::cout << "A car driving " << v << " in a time of " << t << " will pass " + << units::quantity_cast>(distance) << ".\n"; } void example_2(double distance_v, double duration_v) @@ -46,8 +46,8 @@ void example_2(double distance_v, double duration_v) units::quantity distance(distance_v); units::quantity duration(duration_v); const auto kmph = quantity_cast(avg_speed(distance, duration)); - std::cout << "Average speed of a car that makes " << distance.count() << " km in " - << duration.count() << " hours is " << kmph.count() << " km/h.\n"; + std::cout << "Average speed of a car that makes " << distance << " in " + << duration << " is " << kmph << ".\n"; } } diff --git a/test_package/test_package.cpp b/test_package/test_package.cpp index 174991d4..16d5c493 100644 --- a/test_package/test_package.cpp +++ b/test_package/test_package.cpp @@ -33,5 +33,5 @@ constexpr units::Velocity avg_speed(D d, T t) int main() { - std::cout << "Average speed = " << avg_speed(240.0km, 2h).count() << " kmph\n"; + std::cout << "Average speed = " << avg_speed(240.km, 2h) << '\n'; }