Skip to content

Commit

Permalink
more operations
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Mar 23, 2024
1 parent cb3ef86 commit 467474b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions quantities/concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ using namespace quantities::_quantities;
template<typename G>
concept additive_group = requires(G x, G y) {
G{};
{ +x } -> std::same_as<G>;
{ -x } -> std::same_as<G>;
{ x + y } -> std::same_as<G>;
{ x - y } -> std::same_as<G>;
Expand All @@ -41,6 +42,8 @@ concept affine_space = requires(A x, A y) {
{ x - y } -> vector_space<K>;
{ y + (x - y) } -> std::same_as<A>;
{ y += (x - y) } -> std::same_as<A&>;
{ y - (x - y) } -> std::same_as<A>;
{ y -= (x - y) } -> std::same_as<A&>;
};

template<typename V>
Expand Down

0 comments on commit 467474b

Please sign in to comment.