refactor: gsl_Assert replaced with gsl_Expects

This commit is contained in:
Mateusz Pusz
2022-10-22 19:31:20 +02:00
parent 17036cb2d0
commit 7e18694790
2 changed files with 3 additions and 3 deletions

View File

@@ -266,7 +266,7 @@ template<Dimension Lhs, Dimension Rhs>
template<Dimension 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>{});
}

View File

@@ -445,7 +445,7 @@ template<Unit Lhs, Unit Rhs>
template<Unit 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);
}
@@ -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>
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_{},
fmt);
}