aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/executor.ccm
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-06-29 19:19:23 +0100
committerLexi Winter <lexi@le-fay.org>2025-06-29 19:19:23 +0100
commita8b0ea58e60bb0326b7f7c8f3c736d89ce9ef1df (patch)
tree6dafcf2674780649dcdc2649855722357837a68e /nihil.posix/executor.ccm
parent4fa6821e0645ff61a9380cd090abff472205c630 (diff)
downloadnihil-a8b0ea58e60bb0326b7f7c8f3c736d89ce9ef1df.tar.gz
nihil-a8b0ea58e60bb0326b7f7c8f3c736d89ce9ef1df.tar.bz2
wip macOS port
Diffstat (limited to 'nihil.posix/executor.ccm')
-rw-r--r--nihil.posix/executor.ccm27
1 files changed, 27 insertions, 0 deletions
diff --git a/nihil.posix/executor.ccm b/nihil.posix/executor.ccm
new file mode 100644
index 0000000..f348dc8
--- /dev/null
+++ b/nihil.posix/executor.ccm
@@ -0,0 +1,27 @@
+/*
+ * This source code is released into the public domain.
+ */
+
+module;
+
+#include <concepts>
+#include <type_traits>
+
+export module nihil.posix:executor;
+
+namespace nihil {
+
+/*
+ * A concept to mark spawn executors.
+ */
+
+export struct exec_tag{};
+
+export template<typename T>
+concept executor =
+ requires (T e) {
+ std::same_as<exec_tag, typename std::remove_cvref_t<T>::tag>;
+ { e.exec() };
+ };
+
+} // namespace nihil