fix: broken concept names fixed

This commit is contained in:
Mateusz Pusz
2023-02-03 16:58:33 +01:00
parent 83aee04da0
commit 0cebb68e2e
4 changed files with 12 additions and 12 deletions

View File

@ -29,7 +29,7 @@
using namespace mp_units; using namespace mp_units;
constexpr quantity_of<isq::speed> auto avg_speed(quantity_of<isq::distance> auto d, quantity_of<isq::duration> auto t) constexpr QuantityOf<isq::speed> auto avg_speed(QuantityOf<isq::distance> auto d, QuantityOf<isq::duration> auto t)
{ {
return quantity_cast<isq::speed>(d / t); return quantity_cast<isq::speed>(d / t);
} }

View File

@ -134,7 +134,7 @@ void example()
const auto a = isq::acceleration(measurement{9.8, 0.1}, m / s2); const auto a = isq::acceleration(measurement{9.8, 0.1}, m / s2);
const auto t = isq::time(measurement{1.2, 0.1}, s); const auto t = isq::time(measurement{1.2, 0.1}, s);
const weak_quantity_of<isq::velocity> auto v = a * t; const WeakQuantityOf<isq::velocity> auto v = a * t;
std::cout << a << " * " << t << " = " << v << " = " << v[km / h] << '\n'; std::cout << a << " * " << t << " = " << v << " = " << v[km / h] << '\n';
const auto length = isq::length(measurement{123., 1.}, si::metre); const auto length = isq::length(measurement{123., 1.}, si::metre);

View File

@ -41,7 +41,7 @@ int main()
const auto lever = isq_angle::position_vector[cm](20); const auto lever = isq_angle::position_vector[cm](20);
const auto force = isq_angle::force[N](500); const auto force = isq_angle::force[N](500);
const auto angle = isq_angle::angular_measure[deg](90.); const auto angle = isq_angle::angular_measure[deg](90.);
const weak_quantity_of<isq_angle::torque> auto torque = const WeakQuantityOf<isq_angle::torque> auto torque =
lever * force * angular::sin(angle) / isq_angle::cotes_angle(1); lever * force * angular::sin(angle) / isq_angle::cotes_angle(1);
std::cout << "Applying a perpendicular force of " << force << " to a " << lever << " long lever results in " std::cout << "Applying a perpendicular force of " << force << " to a " << lever << " long lever results in "

View File

@ -37,9 +37,9 @@ namespace {
using namespace mp_units; using namespace mp_units;
quantity_of<isq::mechanical_energy> auto total_energy(weak_quantity_of<isq::momentum> auto p, QuantityOf<isq::mechanical_energy> auto total_energy(WeakQuantityOf<isq::momentum> auto p,
weak_quantity_of<isq::mass> auto m, WeakQuantityOf<isq::mass> auto m,
weak_quantity_of<isq::speed> auto c) WeakQuantityOf<isq::speed> auto c)
{ {
return quantity_cast<isq::mechanical_energy>(sqrt(pow<2>(p * c) + pow<2>(m * pow<2>(c)))); return quantity_cast<isq::mechanical_energy>(sqrt(pow<2>(p * c) + pow<2>(m * pow<2>(c))));
} }
@ -49,9 +49,9 @@ void si_example()
using namespace mp_units::si::unit_symbols; using namespace mp_units::si::unit_symbols;
constexpr auto GeV = si::giga<si::electronvolt>; constexpr auto GeV = si::giga<si::electronvolt>;
constexpr quantity_of<isq::speed> auto c = si::si2019::speed_of_light_in_vacuum(1.); constexpr QuantityOf<isq::speed> auto c = si::si2019::speed_of_light_in_vacuum(1.);
const weak_quantity_of<isq::momentum> auto p1 = isq::mechanical_energy(4., GeV) / c; const WeakQuantityOf<isq::momentum> auto p1 = isq::mechanical_energy(4., GeV) / c;
const weak_quantity_of<isq::mass> auto m1 = isq::mechanical_energy(3., GeV) / pow<2>(c); const WeakQuantityOf<isq::mass> auto m1 = isq::mechanical_energy(3., GeV) / pow<2>(c);
const auto E = total_energy(p1, m1, c); const auto E = total_energy(p1, m1, c);
std::cout << "\n*** SI units (c = " << c << " = " << c[si::metre / s] << ") ***\n"; std::cout << "\n*** SI units (c = " << c << " = " << c[si::metre / s] << ") ***\n";
@ -88,9 +88,9 @@ void natural_example()
using namespace mp_units::natural; using namespace mp_units::natural;
using namespace mp_units::natural::unit_symbols; using namespace mp_units::natural::unit_symbols;
constexpr quantity_of<isq::speed> auto c = 1. * speed_of_light_in_vacuum; constexpr QuantityOf<isq::speed> auto c = 1. * speed_of_light_in_vacuum;
const quantity_of<isq::momentum> auto p = 4. * momentum[GeV]; const QuantityOf<isq::momentum> auto p = 4. * momentum[GeV];
const quantity_of<isq::mass> auto m = 3. * mass[GeV]; const QuantityOf<isq::mass> auto m = 3. * mass[GeV];
const auto E = total_energy(p, m, c); const auto E = total_energy(p, m, c);
std::cout << "\n*** Natural units (c = " << c << ") ***\n" std::cout << "\n*** Natural units (c = " << c << ") ***\n"