diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-09-22 16:27:21 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-09-22 16:27:21 +0200 |
| commit | 43e44bc35b18c7e6938d8b5103ae8a76dd06f5a0 (patch) | |
| tree | ee17a1616d3283ddac48a7c10e73b54bd455d81c /ttwhy/routers/router_concepts.cppm | |
| parent | db2cf722c5e5b5399c8163a1d77cccf963c6fa78 (diff) | |
| download | ttwhy-43e44bc35b18c7e6938d8b5103ae8a76dd06f5a0.tar.xz ttwhy-43e44bc35b18c7e6938d8b5103ae8a76dd06f5a0.zip | |
lib/routers: introduce router concept
Diffstat (limited to 'ttwhy/routers/router_concepts.cppm')
| -rw-r--r-- | ttwhy/routers/router_concepts.cppm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ttwhy/routers/router_concepts.cppm b/ttwhy/routers/router_concepts.cppm new file mode 100644 index 0000000..ce143cb --- /dev/null +++ b/ttwhy/routers/router_concepts.cppm @@ -0,0 +1,20 @@ +module; + +#include <asio.hpp> + +#include <concepts> + +export module ttwhy.routers:router_concepts; + +import ttwhy.scanners; + +namespace ttwhy +{ + + export template<typename Candidate> + concept router = requires(Candidate candidate, scanners::input_event event) { + typename Candidate::terminal_policy; + { candidate.process(event) } -> std::same_as<asio::awaitable<void>>; + }; + +} // namespace ttwhy |
