summaryrefslogtreecommitdiff
path: root/src/concepts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/concepts.h')
-rw-r--r--src/concepts.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/concepts.h b/src/concepts.h
new file mode 100644
index 0000000..61f7cbf
--- /dev/null
+++ b/src/concepts.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <concepts>
+
+namespace concepts {
+
+template <typename V>
+concept Arithmetic = requires(V a, V b) {
+ a + b;
+ a += b;
+
+ a - b;
+ a -= b;
+
+ a * b;
+ a *= b;
+
+ a / b;
+ a /= b;
+};
+
+}