mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 12:24:26 +02:00
refactor: not needed remove_reference_t
and remove_cvref_t
removed
This commit is contained in:
@@ -82,7 +82,7 @@ static_assert(!std::convertible_to<min_impl<double>, quantity<si::metre, min_imp
|
||||
|
||||
// multiply syntax should work
|
||||
template<typename T, auto U>
|
||||
concept creates_quantity = Unit<std::remove_cvref_t<decltype(U)>> && requires { T{} * U; };
|
||||
concept creates_quantity = Unit<decltype(U)> && requires { T{} * U; };
|
||||
|
||||
static_assert(creates_quantity<min_impl<int>, si::metre>);
|
||||
static_assert(creates_quantity<min_impl<double>, si::metre>);
|
||||
|
@@ -83,7 +83,7 @@ static_assert(Magnitude<decltype(mag<2>)>);
|
||||
static_assert(Magnitude<mag_2_>);
|
||||
|
||||
// is_named_magnitude
|
||||
static_assert(!is_named_magnitude<std::remove_cvref_t<decltype(mag<2>)>>);
|
||||
static_assert(!is_named_magnitude<decltype(mag<2>)>);
|
||||
static_assert(is_named_magnitude<mag_2_>);
|
||||
|
||||
// power_v
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include <type_traits>
|
||||
|
||||
template<auto V, typename T>
|
||||
inline constexpr bool is_of_type = std::is_same_v<std::remove_cvref_t<decltype(V)>, T>;
|
||||
inline constexpr bool is_of_type = std::is_same_v<decltype(V), T>;
|
||||
|
||||
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
|
||||
#ifdef MP_UNITS_API_NO_CRTP
|
||||
|
@@ -240,7 +240,6 @@ static_assert(si::yotta<metre>.symbol == "Ym");
|
||||
static_assert(si::ronna<metre>.symbol == "Rm");
|
||||
static_assert(si::quetta<metre>.symbol == "Qm");
|
||||
|
||||
|
||||
// scaled_unit
|
||||
constexpr auto m_1 = mag<1> * metre;
|
||||
static_assert(is_of_type<m_1, metre_>);
|
||||
|
Reference in New Issue
Block a user