From f924e16b7f4dad1766343383bd678e0df7271fe3 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 22 May 2025 14:23:51 -0400 Subject: ecs: compile-time-assert --- src/compile-time-assert.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/compile-time-assert.hpp (limited to 'src/compile-time-assert.hpp') 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 class compt_a; +template <> class compt_a{static const bool value = true;}; + +#endif /* PKE_COMPILE_TIME_ASSERT_HPP */ -- cgit v1.2.3