aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/executor.ccm
blob: f348dc89dfe99c52205fb5a80cff308ffba1cf0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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