summaryrefslogtreecommitdiff
path: root/src/compile-time-assert.hpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-05-22 14:23:51 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-05-22 14:23:51 -0400
commitf924e16b7f4dad1766343383bd678e0df7271fe3 (patch)
treeafeb5de46e4f4a144c1c781f24c00a2c33d00555 /src/compile-time-assert.hpp
parentea7c4d554fc6735f9442797527834ae95c51267b (diff)
ecs: compile-time-assert
Diffstat (limited to 'src/compile-time-assert.hpp')
-rw-r--r--src/compile-time-assert.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compile-time-assert.hpp b/src/compile-time-assert.hpp
new file mode 100644
index 0000000..bc325d7
--- /dev/null
+++ b/src/compile-time-assert.hpp
@@ -0,0 +1,10 @@
+#ifndef PKE_COMPILE_TIME_ASSERT_HPP
+#define PKE_COMPILE_TIME_ASSERT_HPP
+
+/* Compile-time assertion.
+ * Useful for detecting changes in well-known data
+ */
+template <bool b> class compt_a;
+template <> class compt_a<true>{static const bool value = true;};
+
+#endif /* PKE_COMPILE_TIME_ASSERT_HPP */