diff --git a/src/core/include/mp-units/framework/representation_concepts.h b/src/core/include/mp-units/framework/representation_concepts.h index ebf12a1a..57b3d7d6 100644 --- a/src/core/include/mp-units/framework/representation_concepts.h +++ b/src/core/include/mp-units/framework/representation_concepts.h @@ -82,11 +82,11 @@ concept ScalableWith = WeaklyRegular && requires(const T v, const S s) { }; template -concept Scalar = (!disable_scalar) && WeaklyRegular && requires(const T a, const T b) { +concept Scalar = (!disable_scalar) && requires(const T a, const T b) { { -a } -> std::common_with; { a + b } -> std::common_with; { a - b } -> std::common_with; -} && ScalableWith; +} && ScalableWith && WeaklyRegular; namespace real_impl { @@ -172,7 +172,7 @@ constexpr bool disable_complex = false; namespace detail { template -concept Complex = (!disable_complex) && WeaklyRegular && requires(const T a, const T b, const T& c) { +concept Complex = (!disable_complex) && requires(const T a, const T b, const T& c) { { -a } -> std::common_with; { a + b } -> std::common_with; { a - b } -> std::common_with; @@ -183,7 +183,7 @@ concept Complex = (!disable_complex) && WeaklyRegular && requires(const T ::mp_units::modulus(a); requires ScalableWith; requires std::constructible_from; -}; +} && WeaklyRegular; namespace magnitude_impl { @@ -233,7 +233,7 @@ constexpr bool disable_vector = false; namespace detail { template -concept Vector = (!disable_vector) && WeaklyRegular && requires(const T a, const T b) { +concept Vector = (!disable_vector) && requires(const T a, const T b) { { -a } -> std::common_with; { a + b } -> std::common_with; { a - b } -> std::common_with; @@ -245,7 +245,7 @@ concept Vector = (!disable_vector) && WeaklyRegular && requires(const T a, // ::mp_units::scalar_product(a, b); // ::mp_units::vector_product(a, b); // ::mp_units::tensor_product(a, b); -}; +} && WeaklyRegular; } // namespace detail