Skip to content

Commit

Permalink
add isArithmetic concept
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Jan 7, 2025
1 parent b716b38 commit 883ed19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/units/units.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ void quantityChecker(Quantity<Mass, Length, Time, Current, Angle, Temperature, L
template <typename Q>
concept isQuantity = requires(Q q) { quantityChecker(q); };

// isArithmetic concept
template <typename T>
concept isArithmetic = std::is_arithmetic_v<T>;

// Isomorphic concept - used to ensure unit equivalency
template <typename Q, typename... Quantities>
concept Isomorphic = ((std::convertible_to<Q, Quantities> && std::convertible_to<Quantities, Q>) && ...);
Expand Down

0 comments on commit 883ed19

Please sign in to comment.