mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-07 06:04:27 +02:00
fix: shadowing compilation errors on MSVC fixed
This commit is contained in:
@@ -275,11 +275,11 @@ struct derived_quantity : quantity<typename Q::dimension, typename Q::unit, Rep>
|
|||||||
static_assert(detail::is_quantity<derived_quantity<double, si::length<metre>, "NTTP type description">>);
|
static_assert(detail::is_quantity<derived_quantity<double, si::length<metre>, "NTTP type description">>);
|
||||||
constexpr isq::Length auto get_length_derived_quantity() noexcept
|
constexpr isq::Length auto get_length_derived_quantity() noexcept
|
||||||
{
|
{
|
||||||
derived_quantity<double, si::length<metre>, "NTTP type description"> a{};
|
derived_quantity<double, si::length<metre>, "NTTP type description"> dist{};
|
||||||
a += 1_q_m;
|
dist += 1_q_m;
|
||||||
a = a + 1_q_m;
|
dist = dist + 1_q_m;
|
||||||
a *= 0.5;
|
dist *= 0.5;
|
||||||
return a;
|
return dist;
|
||||||
}
|
}
|
||||||
static_assert(get_length_derived_quantity() == 1_q_m);
|
static_assert(get_length_derived_quantity() == 1_q_m);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user