aboutsummaryrefslogtreecommitdiff
path: root/source/lib/include/wanda/meta/keyed.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-05-17 17:58:38 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-05-17 17:58:38 +0200
commit577fc0845718ed8ad5bebf02a277c0579a817f77 (patch)
tree3d1cdc53c426a0ba60a7996619a7b787850bb3b3 /source/lib/include/wanda/meta/keyed.hpp
parentde5bf7ca3b7a2bf6be35b86486b00dc6a071b950 (diff)
downloadwanda-577fc0845718ed8ad5bebf02a277c0579a817f77.tar.xz
wanda-577fc0845718ed8ad5bebf02a277c0579a817f77.zip
wanda: restructure source layoutHEADdevelop
Diffstat (limited to 'source/lib/include/wanda/meta/keyed.hpp')
-rw-r--r--source/lib/include/wanda/meta/keyed.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/lib/include/wanda/meta/keyed.hpp b/source/lib/include/wanda/meta/keyed.hpp
new file mode 100644
index 0000000..a09d1eb
--- /dev/null
+++ b/source/lib/include/wanda/meta/keyed.hpp
@@ -0,0 +1,28 @@
+/**
+ * @file keyed.hpp
+ * @author Felix Morgner (felix.morgner@gmail.com)
+ * @since 1.0.0
+ */
+
+#ifndef WANDA_META_KEYED_HPP
+#define WANDA_META_KEYED_HPP
+
+namespace wanda::meta
+{
+ /**
+ * @brief A tag type to prevent construction of a type without a factory
+ */
+ template<typename Derived>
+ struct keyed
+ {
+ protected:
+ struct key
+ {
+ };
+
+ explicit keyed(key) {}
+ };
+
+} // namespace wanda::meta
+
+#endif \ No newline at end of file