refactor: reference specifiers are now variable templates

This commit is contained in:
Mateusz Pusz
2024-06-20 09:20:33 +02:00
parent 1eac5a923b
commit 4b46be7604
18 changed files with 120 additions and 125 deletions

View File

@@ -238,7 +238,7 @@ This introduces an additional type-safety.
using namespace mp_units::si::unit_symbols;
using namespace mp_units::usc::unit_symbols;
quantity_point temp = 20. * absolute(deg_C);
quantity_point temp = 20. * absolute<deg_C>;
std::println("Temperature: {} ({})",
temp.quantity_from_zero(),
temp.in(deg_F).quantity_from_zero());
@@ -259,7 +259,7 @@ This introduces an additional type-safety.
using namespace mp_units::si::unit_symbols;
using namespace mp_units::usc::unit_symbols;
quantity_point temp = 20. * absolute(deg_C);
quantity_point temp = 20. * absolute<deg_C>;
std::println("Temperature: {} ({})",
temp.quantity_from_zero(),
temp.in(deg_F).quantity_from_zero());