mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-31 19:04:27 +02:00
refactor: reference specifiers are now variable templates
This commit is contained in:
@@ -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());
|
||||
|
Reference in New Issue
Block a user