From c06a533f500d3a8456b2972fdfcbd71a897a9a15 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 6 Sep 2024 18:30:58 +0200 Subject: [PATCH] refactor: `Representation` concepts now requires `WeaklyRegular` instead of `std::regular` --- .../include/mp-units/framework/representation_concepts.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/include/mp-units/framework/representation_concepts.h b/src/core/include/mp-units/framework/representation_concepts.h index 6019d215..5adbbee0 100644 --- a/src/core/include/mp-units/framework/representation_concepts.h +++ b/src/core/include/mp-units/framework/representation_concepts.h @@ -79,10 +79,14 @@ concept Scalable = CastableNumber || (requires { typename wrapped_type_t; } && CastableNumber> && ScalableNumber, std::intmax_t>>); +template +concept WeaklyRegular = std::copyable && std::equality_comparable; + } // namespace detail MP_UNITS_EXPORT template -concept Representation = (is_scalar || is_vector || is_tensor)&&std::regular && detail::Scalable; +concept Representation = + (is_scalar || is_vector || is_tensor)&&detail::WeaklyRegular && detail::Scalable; MP_UNITS_EXPORT template concept RepresentationOf = Representation && ((Ch == quantity_character::scalar && is_scalar) ||