Skip to content

Commit

Permalink
feat: negation requirement added to Representation concepts
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Nov 7, 2024
1 parent 315e47c commit 10a8226
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/include/mp-units/framework/representation_concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ concept ScalarRepresentation = Scalar<T> && WeaklyRegular<T> && requires(T a, T
{ a / f } -> Scalar;

// scalar operations
{ -a } -> Scalar;
{ a + b } -> Scalar;
{ a - b } -> Scalar;
{ a* b } -> Scalar;
Expand All @@ -112,6 +113,7 @@ concept ComplexRepresentation = Complex<T> && WeaklyRegular<T> && requires(T a,
{ a / T(f) } -> Complex;

// complex operations
{ -a } -> Complex;
{ a + b } -> Complex;
{ a - b } -> Complex;
{ a* b } -> Complex;
Expand All @@ -134,6 +136,7 @@ concept VectorRepresentation = Vector<T> && WeaklyRegular<T> && requires(T a, T
{ a / f } -> Vector;

// vector operations
{ -a } -> Vector;
{ a + b } -> Vector;
{ a - b } -> Vector;
// TBD
Expand Down

0 comments on commit 10a8226

Please sign in to comment.