refactor: got rid of gcc-9 backlog

BREAKING CHANGE: gcc-9.3 no longer supported
This commit is contained in:
Mateusz Pusz
2020-09-08 13:09:34 +02:00
parent 7ed4f19ef3
commit 4bb51586dc
27 changed files with 131 additions and 760 deletions
+5 -5
View File
@@ -27,7 +27,7 @@
using namespace units::physical;
constexpr Speed AUTO avg_speed(Length AUTO d, Time AUTO t)
constexpr Speed auto avg_speed(Length auto d, Time auto t)
{
return d / t;
}
@@ -35,10 +35,10 @@ constexpr Speed AUTO avg_speed(Length AUTO d, Time AUTO t)
int main()
{
using namespace units::physical::si::literals;
Speed AUTO v1 = avg_speed(220q_km, 2q_h);
Speed AUTO v2 = avg_speed(si::length<international::mile>(140), si::time<si::hour>(2));
Speed AUTO v3 = quantity_cast<si::metre_per_second>(v2);
Speed AUTO v4 = quantity_cast<int>(v3);
Speed auto v1 = avg_speed(220q_km, 2q_h);
Speed auto v2 = avg_speed(si::length<international::mile>(140), si::time<si::hour>(2));
Speed auto v3 = quantity_cast<si::metre_per_second>(v2);
Speed auto v4 = quantity_cast<int>(v3);
std::cout << v1 << '\n'; // 110 km/h
std::cout << fmt::format("{}", v2) << '\n'; // 70 mi/h