Skip to content

Commit 883ed19

Browse files
committed
add isArithmetic concept
1 parent b716b38 commit 883ed19

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/units/units.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ void quantityChecker(Quantity<Mass, Length, Time, Current, Angle, Temperature, L
131131
template <typename Q>
132132
concept isQuantity = requires(Q q) { quantityChecker(q); };
133133

134+
// isArithmetic concept
135+
template <typename T>
136+
concept isArithmetic = std::is_arithmetic_v<T>;
137+
134138
// Isomorphic concept - used to ensure unit equivalency
135139
template <typename Q, typename... Quantities>
136140
concept Isomorphic = ((std::convertible_to<Q, Quantities> && std::convertible_to<Quantities, Q>) && ...);

0 commit comments

Comments
 (0)