aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/executor.ccm
blob: d9bde88e11e7533b10a6cfcd32e58e37e4d333ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// This source code is released into the public domain.
export module nihil.posix:executor;

import nihil.std;

namespace nihil {

// A concept to mark spawn executors, which should contain:
//	using tag = exec_tag;

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