mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-06 13:44:27 +02:00
refactor: gsl_Assert
replaced with gsl_Expects
This commit is contained in:
@@ -266,7 +266,7 @@ template<Dimension Lhs, Dimension Rhs>
|
|||||||
template<Dimension D>
|
template<Dimension D>
|
||||||
[[nodiscard]] consteval Dimension auto operator/(int value, D)
|
[[nodiscard]] consteval Dimension auto operator/(int value, D)
|
||||||
{
|
{
|
||||||
gsl_Assert(value == 1);
|
gsl_Expects(value == 1);
|
||||||
return detail::expr_invert<derived_dimension, struct one_dim>(detail::dim_type<D>{});
|
return detail::expr_invert<derived_dimension, struct one_dim>(detail::dim_type<D>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -445,7 +445,7 @@ template<Unit Lhs, Unit Rhs>
|
|||||||
template<Unit U>
|
template<Unit U>
|
||||||
[[nodiscard]] consteval Unit auto operator/(int value, U u)
|
[[nodiscard]] consteval Unit auto operator/(int value, U u)
|
||||||
{
|
{
|
||||||
gsl_Assert(value == 1);
|
gsl_Expects(value == 1);
|
||||||
return detail::expr_invert<derived_unit, struct one>(u);
|
return detail::expr_invert<derived_unit, struct one>(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -678,7 +678,7 @@ constexpr Out unit_symbol_impl(Out out, const type_list<Nums...>& nums, const ty
|
|||||||
template<typename CharT, std::output_iterator<CharT> Out, typename... Us>
|
template<typename CharT, std::output_iterator<CharT> Out, typename... Us>
|
||||||
constexpr Out unit_symbol_impl(Out out, const derived_unit<Us...>&, unit_symbol_formatting fmt, bool negative_power)
|
constexpr Out unit_symbol_impl(Out out, const derived_unit<Us...>&, unit_symbol_formatting fmt, bool negative_power)
|
||||||
{
|
{
|
||||||
gsl_Assert(negative_power == false);
|
gsl_Expects(negative_power == false);
|
||||||
return unit_symbol_impl<CharT>(out, typename derived_unit<Us...>::_num_{}, typename derived_unit<Us...>::_den_{},
|
return unit_symbol_impl<CharT>(out, typename derived_unit<Us...>::_num_{}, typename derived_unit<Us...>::_den_{},
|
||||||
fmt);
|
fmt);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user