Skip to content

Commit

Permalink
refactor: MP_UNITS_NONCONST_TYPE introduced to benefit from the C++…
Browse files Browse the repository at this point in the history
…23 feature
  • Loading branch information
mpusz committed Nov 13, 2024
1 parent 5cd07bc commit 2590aa4
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 59 deletions.
2 changes: 1 addition & 1 deletion src/core/include/mp-units/bits/get_associated_quantity.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ template<AssociatedUnit U>
[[nodiscard]] consteval auto all_are_kinds(U)
{
if constexpr (requires { U::_quantity_spec_; })
return QuantityKindSpec<std::remove_const_t<decltype(U::_quantity_spec_)>>;
return QuantityKindSpec<MP_UNITS_NONCONST_TYPE(U::_quantity_spec_)>;
else if constexpr (requires { U::_reference_unit_; })
return all_are_kinds(U::_reference_unit_);
else if constexpr (requires { typename U::_num_; }) {
Expand Down
6 changes: 6 additions & 0 deletions src/core/include/mp-units/bits/hacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
// workarounds for https://cplusplus.github.io/CWG/issues/2387.html
#define MP_UNITS_INLINE inline

#if __cpp_auto_cast >= 202110L
#define MP_UNITS_NONCONST_TYPE(expr) decltype(auto(expr))
#else
#define MP_UNITS_NONCONST_TYPE(expr) std::remove_const_t<decltype(expr)>
#endif

#if MP_UNITS_COMP_GCC

#define MP_UNITS_REMOVE_CONST(expr) std::remove_const_t<expr>
Expand Down
3 changes: 1 addition & 2 deletions src/core/include/mp-units/bits/sudo_cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ template<QuantityPoint ToQP, typename FwdFromQP, QuantityPoint FromQP = std::rem
(!equivalent(FromQP::unit, ToQP::unit)))
[[nodiscard]] constexpr QuantityPoint auto sudo_cast(FwdFromQP&& qp)
{
if constexpr (is_same_v<std::remove_const_t<decltype(ToQP::point_origin)>,
std::remove_const_t<decltype(FromQP::point_origin)>>) {
if constexpr (is_same_v<MP_UNITS_NONCONST_TYPE(ToQP::point_origin), MP_UNITS_NONCONST_TYPE(FromQP::point_origin)>) {
return quantity_point{
sudo_cast<typename ToQP::quantity_type>(std::forward<FwdFromQP>(qp).quantity_from(FromQP::point_origin)),
FromQP::point_origin};
Expand Down
4 changes: 2 additions & 2 deletions src/core/include/mp-units/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ class MP_UNITS_STD_FMT::formatter<mp_units::quantity<Reference, Rep>, Char> {
static constexpr auto dimension = get_quantity_spec(Reference).dimension;

using quantity_t = mp_units::quantity<Reference, Rep>;
using unit_t = std::remove_const_t<decltype(unit)>;
using dimension_t = std::remove_const_t<decltype(dimension)>;
using unit_t = MP_UNITS_NONCONST_TYPE(unit);
using dimension_t = MP_UNITS_NONCONST_TYPE(dimension);
using format_specs = mp_units::detail::fill_align_width_format_specs<Char>;

format_specs specs_{};
Expand Down
4 changes: 2 additions & 2 deletions src/core/include/mp-units/framework/quantity.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ concept InvokeResultOf = QuantitySpec<MP_UNITS_REMOVE_CONST(decltype(QS))> && st
RepresentationOf<std::invoke_result_t<Func, T, U>, QS>;

template<typename Func, typename Q1, typename Q2,
auto QS = std::invoke_result_t<Func, std::remove_const_t<decltype(Q1::quantity_spec)>,
std::remove_const_t<decltype(Q2::quantity_spec)>>{}>
auto QS = std::invoke_result_t<Func, MP_UNITS_NONCONST_TYPE(Q1::quantity_spec),
MP_UNITS_NONCONST_TYPE(Q2::quantity_spec)>{}>
concept InvocableQuantities = QuantitySpec<MP_UNITS_REMOVE_CONST(decltype(QS))> && Quantity<Q1> && Quantity<Q2> &&
InvokeResultOf<QS, Func, typename Q1::rep, typename Q2::rep>;

Expand Down
2 changes: 1 addition & 1 deletion src/core/include/mp-units/framework/quantity_concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ concept QuantityLikeImpl = requires(const T& qty, const Traits<T>::rep& num) {
* the provided quantity_spec type.
*/
MP_UNITS_EXPORT template<typename Q, auto QS>
concept QuantityOf = Quantity<Q> && QuantitySpecOf<std::remove_const_t<decltype(Q::quantity_spec)>, QS>;
concept QuantityOf = Quantity<Q> && QuantitySpecOf<MP_UNITS_NONCONST_TYPE(Q::quantity_spec), QS>;

/**
* @brief A concept matching all external quantities like types
Expand Down
10 changes: 5 additions & 5 deletions src/core/include/mp-units/framework/quantity_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ struct point_origin_interface {
}

template<PointOrigin PO, Quantity Q>
requires ReferenceOf<std::remove_const_t<decltype(Q::reference)>, PO::_quantity_spec_>
requires ReferenceOf<MP_UNITS_NONCONST_TYPE(Q::reference), PO::_quantity_spec_>
[[nodiscard]] friend constexpr QuantityPoint auto operator-(PO po, const Q& q)
requires requires { -q; }
{
return po + (-q);
}

template<PointOrigin PO1, detail::SameAbsolutePointOriginAs<PO1{}> PO2>
requires QuantitySpecOf<std::remove_const_t<decltype(PO1::_quantity_spec_)>, PO2::_quantity_spec_> &&
requires QuantitySpecOf<MP_UNITS_NONCONST_TYPE(PO1::_quantity_spec_), PO2::_quantity_spec_> &&
(is_derived_from_specialization_of_v<PO1, relative_point_origin> ||
is_derived_from_specialization_of_v<PO2, relative_point_origin>)
[[nodiscard]] friend constexpr Quantity auto operator-(PO1 po1, PO2 po2)
Expand Down Expand Up @@ -118,7 +118,7 @@ struct relative_point_origin : detail::point_origin_interface {
static constexpr QuantityPoint auto _quantity_point_ = QP;
static constexpr QuantitySpec auto _quantity_spec_ = []() {
// select the strongest of specs
if constexpr (detail::QuantityKindSpec<std::remove_const_t<decltype(QP.quantity_spec)>>)
if constexpr (detail::QuantityKindSpec<MP_UNITS_NONCONST_TYPE(QP.quantity_spec)>)
return QP.point_origin._quantity_spec_;
else
return QP.quantity_spec;
Expand Down Expand Up @@ -497,7 +497,7 @@ class quantity_point {

template<std::derived_from<quantity_point> QP, PointOrigin PO2>
requires QuantityPointOf<quantity_point, PO2{}> &&
ReferenceOf<std::remove_const_t<decltype(reference)>, PO2::_quantity_spec_>
ReferenceOf<MP_UNITS_NONCONST_TYPE(reference), PO2::_quantity_spec_>
[[nodiscard]] friend constexpr Quantity auto operator-(const QP& qp, PO2 po)
{
if constexpr (point_origin == po)
Expand All @@ -520,7 +520,7 @@ class quantity_point {

template<PointOrigin PO1, std::derived_from<quantity_point> QP>
requires QuantityPointOf<quantity_point, PO1{}> &&
ReferenceOf<std::remove_const_t<decltype(reference)>, PO1::_quantity_spec_>
ReferenceOf<MP_UNITS_NONCONST_TYPE(reference), PO1::_quantity_spec_>
[[nodiscard]] friend constexpr Quantity auto operator-(PO1 po, const QP& qp)
{
return -(qp - po);
Expand Down
4 changes: 2 additions & 2 deletions src/core/include/mp-units/framework/quantity_point_concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ concept SameAbsolutePointOriginAs =
*/
MP_UNITS_EXPORT template<typename QP, auto V>
concept QuantityPointOf =
QuantityPoint<QP> && (QuantitySpecOf<std::remove_const_t<decltype(QP::quantity_spec)>, V> ||
detail::SameAbsolutePointOriginAs<std::remove_const_t<decltype(QP::absolute_point_origin)>, V>);
QuantityPoint<QP> && (QuantitySpecOf<MP_UNITS_NONCONST_TYPE(QP::quantity_spec), V> ||
detail::SameAbsolutePointOriginAs<MP_UNITS_NONCONST_TYPE(QP::absolute_point_origin), V>);

/**
* @brief A concept matching all external quantity point like types
Expand Down
6 changes: 3 additions & 3 deletions src/core/include/mp-units/framework/quantity_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ using type_list_of_quantity_spec_less = expr_less<T1, T2, quantity_spec_less>;

template<NamedQuantitySpec Q>
requires requires { Q::dimension; }
using to_dimension = std::remove_const_t<decltype(Q::dimension)>;
using to_dimension = MP_UNITS_NONCONST_TYPE(Q::dimension);

template<AssociatedUnit U>
[[nodiscard]] consteval auto get_associated_quantity(U);
Expand Down Expand Up @@ -925,10 +925,10 @@ template<typename From, typename To>
return extract_results{false};
else if constexpr (from_exp > to_exp)
return extract_results{true, from_factor, to_factor, prepend_rest::first,
power_or_T<std::remove_const_t<decltype(from_factor)>, from_exp - to_exp>{}};
power_or_T<MP_UNITS_NONCONST_TYPE(from_factor), from_exp - to_exp>{}};
else
return extract_results{true, from_factor, to_factor, prepend_rest::second,
power_or_T<std::remove_const_t<decltype(to_factor)>, to_exp - from_exp>{}};
power_or_T<MP_UNITS_NONCONST_TYPE(to_factor), to_exp - from_exp>{}};
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/core/include/mp-units/framework/quantity_spec_concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ namespace detail {
*/
template<typename T>
concept DerivedQuantitySpec =
QuantitySpec<T> && (is_specialization_of<T, derived_quantity_spec> ||
(QuantityKindSpec<T> &&
is_specialization_of<std::remove_const_t<decltype(T::_quantity_spec_)>, derived_quantity_spec>));
QuantitySpec<T> &&
(is_specialization_of<T, derived_quantity_spec> ||
(QuantityKindSpec<T> && is_specialization_of<MP_UNITS_NONCONST_TYPE(T::_quantity_spec_), derived_quantity_spec>));

} // namespace detail

Expand Down
10 changes: 5 additions & 5 deletions src/core/include/mp-units/framework/unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ struct unit_interface {
template<Magnitude M, Unit U>
[[nodiscard]] friend MP_UNITS_CONSTEVAL Unit auto operator*(M, U u)
{
if constexpr (std::is_same_v<M, std::remove_const_t<decltype(mp_units::mag<1>)>>)
if constexpr (std::is_same_v<M, MP_UNITS_NONCONST_TYPE(mp_units::mag<1>)>)
return u;
else if constexpr (is_specialization_of_scaled_unit<U>) {
if constexpr (M{} * U::_mag_ == mag<1>)
return U::_reference_unit_;
else
return scaled_unit<M{} * U::_mag_, std::remove_const_t<decltype(U::_reference_unit_)>>{};
return scaled_unit<M{} * U::_mag_, MP_UNITS_NONCONST_TYPE(U::_reference_unit_)>{};
} else
return scaled_unit<M{}, U>{};
}
Expand Down Expand Up @@ -304,15 +304,15 @@ struct named_unit;
* @tparam QuantitySpec a specification of a base quantity to be measured with this unit
*/
template<symbol_text Symbol, detail::QuantityKindSpec auto QS>
requires(!Symbol.empty()) && detail::BaseDimension<std::remove_const_t<decltype(QS.dimension)>>
requires(!Symbol.empty()) && detail::BaseDimension<MP_UNITS_NONCONST_TYPE(QS.dimension)>
struct named_unit<Symbol, QS> : detail::unit_interface {
using _base_type_ = named_unit; // exposition only
static constexpr auto _symbol_ = Symbol; ///< Unique base unit identifier
static constexpr auto _quantity_spec_ = QS;
};

template<symbol_text Symbol, detail::QuantityKindSpec auto QS, PointOrigin auto PO>
requires(!Symbol.empty()) && detail::BaseDimension<std::remove_const_t<decltype(QS.dimension)>>
requires(!Symbol.empty()) && detail::BaseDimension<MP_UNITS_NONCONST_TYPE(QS.dimension)>
struct named_unit<Symbol, QS, PO> : detail::unit_interface {
using _base_type_ = named_unit; // exposition only
static constexpr auto _symbol_ = Symbol; ///< Unique base unit identifier
Expand Down Expand Up @@ -427,7 +427,7 @@ template<Unit U1, Unit U2>
if constexpr (common_magnitude == mag<1>)
return canonical_lhs.reference_unit;
else
return scaled_unit<common_magnitude, std::remove_const_t<decltype(canonical_lhs.reference_unit)>>{};
return scaled_unit<common_magnitude, MP_UNITS_NONCONST_TYPE(canonical_lhs.reference_unit)>{};
}

[[nodiscard]] consteval Unit auto get_common_scaled_unit(Unit auto u1, Unit auto u2, Unit auto u3, Unit auto... rest)
Expand Down
2 changes: 1 addition & 1 deletion src/systems/include/mp-units/systems/si/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ template<QuantityOf<MP_UNITS_IS_VALUE_WORKAROUND(isq::time)> Q>
}

template<QuantityPointOf<MP_UNITS_IS_VALUE_WORKAROUND(isq::time)> QP>
requires is_specialization_of<std::remove_const_t<decltype(QP::absolute_point_origin)>, chrono_point_origin_>
requires is_specialization_of<MP_UNITS_NONCONST_TYPE(QP::absolute_point_origin), chrono_point_origin_>
[[nodiscard]] constexpr auto to_chrono_time_point(const QP& qp)
{
using clock = decltype(QP::absolute_point_origin)::clock;
Expand Down
20 changes: 10 additions & 10 deletions test/static/concepts_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static_assert(!detail::BaseDimension<decltype(isq::dim_length / isq::dim_time)>)
static_assert(!detail::BaseDimension<decltype(inverse(isq::dim_time))>);
static_assert(!detail::BaseDimension<decltype(pow<2>(isq::dim_length))>);
static_assert(!detail::BaseDimension<derived_dimension<struct isq::dim_length, per<struct isq::dim_time>>>);
static_assert(!detail::BaseDimension<std::remove_const_t<decltype(dim_speed)>>);
static_assert(!detail::BaseDimension<MP_UNITS_NONCONST_TYPE(dim_speed)>);
static_assert(!detail::BaseDimension<base_dimension<"L">>);
static_assert(!detail::BaseDimension<struct si::metre>);
static_assert(!detail::BaseDimension<int>);
Expand All @@ -67,7 +67,7 @@ static_assert(Dimension<decltype(inverse(isq::dim_time))>);
static_assert(Dimension<decltype(pow<2>(isq::dim_length))>);
static_assert(Dimension<derived_dimension<struct isq::dim_length, per<struct isq::dim_time>>>);
static_assert(Dimension<struct dimension_one>);
static_assert(Dimension<std::remove_const_t<decltype(dim_speed)>>);
static_assert(Dimension<MP_UNITS_NONCONST_TYPE(dim_speed)>);
static_assert(!Dimension<base_dimension<"L">>);
static_assert(!Dimension<struct si::metre>);
static_assert(!Dimension<int>);
Expand All @@ -85,7 +85,7 @@ static_assert(QuantitySpec<kind_of_<struct isq::length>>);
static_assert(QuantitySpec<decltype(isq::length / isq::time)>);
static_assert(QuantitySpec<decltype(pow<2>(isq::length))>);
static_assert(QuantitySpec<struct dimensionless>);
static_assert(QuantitySpec<std::remove_const_t<decltype(speed)>>);
static_assert(QuantitySpec<MP_UNITS_NONCONST_TYPE(speed)>);
static_assert(!QuantitySpec<struct isq::dim_length>);
static_assert(!QuantitySpec<int>);

Expand All @@ -97,7 +97,7 @@ static_assert(!detail::NamedQuantitySpec<kind_of_<struct isq::length>>);
static_assert(!detail::NamedQuantitySpec<decltype(isq::length / isq::time)>);
static_assert(!detail::NamedQuantitySpec<decltype(pow<2>(isq::length))>);
static_assert(detail::NamedQuantitySpec<struct dimensionless>);
static_assert(!detail::NamedQuantitySpec<std::remove_const_t<decltype(speed)>>);
static_assert(!detail::NamedQuantitySpec<MP_UNITS_NONCONST_TYPE(speed)>);
static_assert(!detail::NamedQuantitySpec<struct isq::dim_length>);
static_assert(!detail::NamedQuantitySpec<int>);

Expand All @@ -109,7 +109,7 @@ static_assert(!detail::DerivedQuantitySpec<struct isq::speed>);
static_assert(detail::DerivedQuantitySpec<decltype(isq::length / isq::time)>);
static_assert(detail::DerivedQuantitySpec<decltype(pow<2>(isq::length))>);
static_assert(!detail::DerivedQuantitySpec<struct dimensionless>);
static_assert(detail::DerivedQuantitySpec<std::remove_const_t<decltype(speed)>>);
static_assert(detail::DerivedQuantitySpec<MP_UNITS_NONCONST_TYPE(speed)>);
static_assert(!detail::DerivedQuantitySpec<struct isq::dim_length>);
static_assert(!detail::DerivedQuantitySpec<int>);

Expand All @@ -121,7 +121,7 @@ static_assert(!detail::QuantityKindSpec<struct isq::speed>);
static_assert(!detail::QuantityKindSpec<decltype(isq::length / isq::time)>);
static_assert(!detail::QuantityKindSpec<decltype(pow<2>(isq::length))>);
static_assert(!detail::QuantityKindSpec<struct dimensionless>);
static_assert(!detail::QuantityKindSpec<std::remove_const_t<decltype(speed)>>);
static_assert(!detail::QuantityKindSpec<MP_UNITS_NONCONST_TYPE(speed)>);
static_assert(!detail::QuantityKindSpec<struct isq::dim_length>);
static_assert(!detail::QuantityKindSpec<int>);

Expand All @@ -130,7 +130,7 @@ static_assert(!detail::QuantityKindSpec<int>);

// Unit
static_assert(Unit<struct si::metre>);
static_assert(Unit<std::remove_const_t<decltype(si::kilogram)>>);
static_assert(Unit<MP_UNITS_NONCONST_TYPE(si::kilogram)>);
static_assert(Unit<si::kilo_<struct si::gram>>);
static_assert(Unit<struct natural::electronvolt>);
static_assert(Unit<decltype(si::metre / si::second)>);
Expand All @@ -156,7 +156,7 @@ static_assert(!Unit<std::chrono::seconds>);
// PrefixableUnit
static_assert(PrefixableUnit<struct si::metre>);
static_assert(PrefixableUnit<struct natural::electronvolt>);
static_assert(!PrefixableUnit<std::remove_const_t<decltype(si::kilogram)>>);
static_assert(!PrefixableUnit<MP_UNITS_NONCONST_TYPE(si::kilogram)>);
static_assert(!PrefixableUnit<si::kilo_<struct si::gram>>);
static_assert(!PrefixableUnit<decltype(si::metre / si::second)>);
static_assert(!PrefixableUnit<decltype(inverse(si::second))>);
Expand All @@ -181,7 +181,7 @@ static_assert(!PrefixableUnit<std::chrono::seconds>);
// AssociatedUnit
static_assert(AssociatedUnit<struct si::metre>);
static_assert(!AssociatedUnit<struct natural::electronvolt>);
static_assert(AssociatedUnit<std::remove_const_t<decltype(si::kilogram)>>);
static_assert(AssociatedUnit<MP_UNITS_NONCONST_TYPE(si::kilogram)>);
static_assert(AssociatedUnit<si::kilo_<struct si::gram>>);
static_assert(AssociatedUnit<decltype(si::metre / si::second)>);
static_assert(AssociatedUnit<decltype(inverse(si::second))>);
Expand All @@ -206,7 +206,7 @@ static_assert(!AssociatedUnit<std::chrono::seconds>);
// UnitOf
static_assert(UnitOf<struct si::metre, isq::length>);
static_assert(UnitOf<struct si::metre, isq::radius>);
static_assert(UnitOf<std::remove_const_t<decltype(si::kilogram)>, isq::mass>);
static_assert(UnitOf<MP_UNITS_NONCONST_TYPE(si::kilogram), isq::mass>);
static_assert(UnitOf<struct si::hertz, isq::frequency>);
static_assert(UnitOf<struct si::hertz, inverse(isq::time)>);
static_assert(UnitOf<struct one, dimensionless>);
Expand Down
4 changes: 2 additions & 2 deletions test/static/dimension_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ inline constexpr auto energy = force * length;

// concepts verification
static_assert(detail::BaseDimension<length_>);
static_assert(!detail::BaseDimension<std::remove_const_t<decltype(frequency)>>);
static_assert(!detail::BaseDimension<MP_UNITS_NONCONST_TYPE(frequency)>);
static_assert(Dimension<length_>);
static_assert(Dimension<std::remove_const_t<decltype(frequency)>>);
static_assert(Dimension<MP_UNITS_NONCONST_TYPE(frequency)>);

static_assert(detail::BaseDimension<decltype(speed * time)>); // length

Expand Down
8 changes: 4 additions & 4 deletions test/static/quantity_point_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,9 @@ static_assert(invalid_unit_conversion<quantity_point>);
/////////

static_assert(std::is_same_v<decltype(quantity_point{123 * m})::rep, int>);
static_assert(std::is_same_v<std::remove_const_t<decltype(quantity_point{123 * m}.point_origin)>,
static_assert(std::is_same_v<MP_UNITS_NONCONST_TYPE(quantity_point{123 * m}.point_origin),
zeroth_point_origin_<kind_of<isq::length>>>);
static_assert(std::is_same_v<std::remove_const_t<decltype(quantity_point{123 * m}.absolute_point_origin)>,
static_assert(std::is_same_v<MP_UNITS_NONCONST_TYPE(quantity_point{123 * m}.absolute_point_origin),
zeroth_point_origin_<kind_of<isq::length>>>);
static_assert(quantity_point{123 * m}.unit == si::metre);
static_assert(quantity_point{123 * m}.quantity_spec == kind_of<isq::length>);
Expand All @@ -914,9 +914,9 @@ static_assert(quantity_point{delta<deg_C>(20)}.quantity_spec == kind_of<isq::the
#if MP_UNITS_HOSTED
using namespace std::chrono_literals;
static_assert(std::is_same_v<decltype(quantity_point{sys_seconds{123s}})::rep, std::chrono::seconds::rep>);
static_assert(std::is_same_v<std::remove_const_t<decltype(quantity_point{sys_seconds{123s}}.point_origin)>,
static_assert(std::is_same_v<MP_UNITS_NONCONST_TYPE(quantity_point{sys_seconds{123s}}.point_origin),
chrono_point_origin_<std::chrono::system_clock>>);
static_assert(std::is_same_v<std::remove_const_t<decltype(quantity_point{sys_seconds{123s}}.absolute_point_origin)>,
static_assert(std::is_same_v<MP_UNITS_NONCONST_TYPE(quantity_point{sys_seconds{123s}}.absolute_point_origin),
chrono_point_origin_<std::chrono::system_clock>>);
static_assert(quantity_point{sys_seconds{24h}}.unit == si::second);
static_assert(quantity_point{sys_seconds{24h}}.quantity_spec == kind_of<isq::time>);
Expand Down
Loading

3 comments on commit 2590aa4

@JohelEGP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you notice any improvements in compile times?

@mpusz
Copy link
Owner Author

@mpusz mpusz commented on 2590aa4 Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't measure. I think it is too small a change compared to the thousands of other instantiations in the codebase to be able to measure anything valuable.

@mpusz
Copy link
Owner Author

@mpusz mpusz commented on 2590aa4 Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it mostly because I like the idea and wanted to make sure that it works properly (as we had it in the wording).

Please sign in to comment.