From 10a82268aa53afaaf62058acc256661b7d897994 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 7 Nov 2024 08:49:31 +0100 Subject: [PATCH] feat: negation requirement added to `Representation` concepts --- src/core/include/mp-units/framework/representation_concepts.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/include/mp-units/framework/representation_concepts.h b/src/core/include/mp-units/framework/representation_concepts.h index d802163d..6a999516 100644 --- a/src/core/include/mp-units/framework/representation_concepts.h +++ b/src/core/include/mp-units/framework/representation_concepts.h @@ -95,6 +95,7 @@ concept ScalarRepresentation = Scalar && WeaklyRegular && requires(T a, T { a / f } -> Scalar; // scalar operations + { -a } -> Scalar; { a + b } -> Scalar; { a - b } -> Scalar; { a* b } -> Scalar; @@ -112,6 +113,7 @@ concept ComplexRepresentation = Complex && WeaklyRegular && requires(T a, { a / T(f) } -> Complex; // complex operations + { -a } -> Complex; { a + b } -> Complex; { a - b } -> Complex; { a* b } -> Complex; @@ -134,6 +136,7 @@ concept VectorRepresentation = Vector && WeaklyRegular && requires(T a, T { a / f } -> Vector; // vector operations + { -a } -> Vector; { a + b } -> Vector; { a - b } -> Vector; // TBD