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

View File

@@ -32,7 +32,7 @@ namespace {
using namespace units::physical;
Energy AUTO total_energy(Momentum AUTO p, Mass AUTO m, Speed AUTO c)
Energy auto total_energy(Momentum auto p, Mass auto m, Speed auto c)
{
return sqrt(pow<2>(p * c) + pow<2>(m * pow<2>(c)));
}
@@ -42,13 +42,13 @@ void si_example()
using namespace units::physical::si;
using GeV = gigaelectronvolt;
constexpr Speed AUTO c = si2019::speed_of_light<>;
constexpr Speed auto c = si2019::speed_of_light<>;
std::cout << "\n*** SI units (c = " << c << ") ***\n";
const Momentum AUTO p = 4.q_GeV / c;
const Mass AUTO m = 3.q_GeV / pow<2>(c);
const Energy AUTO E = total_energy(p, m, c);
const Momentum auto p = 4.q_GeV / c;
const Mass auto m = 3.q_GeV / pow<2>(c);
const Energy auto E = total_energy(p, m, c);
std::cout << "[in GeV]\n"
<< "p = " << p << "\n"
@@ -73,10 +73,10 @@ void natural_example()
using namespace units::physical::natural;
using GeV = gigaelectronvolt;
constexpr Speed AUTO c = speed_of_light<>;
constexpr Speed auto c = speed_of_light<>;
const momentum<GeV> p(4);
const mass<GeV> m(3);
const Energy AUTO E = total_energy(p, m, c);
const Energy auto E = total_energy(p, m, c);
std::cout << "\n*** Natural units (c = " << c << ") ***\n"
<< "p = " << p << "\n"