summaryrefslogtreecommitdiff
path: root/ecs/src/system/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/system/util.rs')
-rw-r--r--ecs/src/system/util.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/ecs/src/system/util.rs b/ecs/src/system/util.rs
new file mode 100644
index 0000000..9d04f1d
--- /dev/null
+++ b/ecs/src/system/util.rs
@@ -0,0 +1,13 @@
+macro_rules! check_params_are_compatible {
+ ($excluded_index: tt, $param: ident, $cnt: tt) => {
+ seq!(N in 0..=$cnt {
+ if N != $excluded_index {
+ if !$param::is_compatible::<TParam~N>() {
+ panic!("Atleast two parameters are incompatible");
+ }
+ }
+ })
+ };
+}
+
+pub(crate) use check_params_are_compatible;