diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-09-22 18:56:44 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-09-22 18:56:44 +0200 |
| commit | 22f6534081acfabdab4956d337604a21e7da5b64 (patch) | |
| tree | a857b256a120d154667f2ed68cbf5151afe0cfbf /ttwhy/io | |
| parent | 676586f2034ff112b309dccc430893d73e919191 (diff) | |
| download | ttwhy-22f6534081acfabdab4956d337604a21e7da5b64.tar.xz ttwhy-22f6534081acfabdab4956d337604a21e7da5b64.zip | |
lib: generalize concepts
Diffstat (limited to 'ttwhy/io')
| -rw-r--r-- | ttwhy/io/readers.cppm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ttwhy/io/readers.cppm b/ttwhy/io/readers.cppm index d15cc7a..56ce2b0 100644 --- a/ttwhy/io/readers.cppm +++ b/ttwhy/io/readers.cppm @@ -16,7 +16,8 @@ import ttwhy.scanners; namespace ttwhy::io { - export template<typename InputStream, router AppRouter> + export template<typename TerminalPolicy = scanners::xterm_policy, typename InputStream, + router<scanners::input_event> AppRouter> auto read_events(InputStream & stream, AppRouter & router) -> asio::awaitable<void> { using namespace asio::experimental::awaitable_operators; @@ -32,8 +33,7 @@ namespace ttwhy::io queue.push_back(event); }; - using terminal_policy = ttwhy::scanners::associated_terminal_policy_t<AppRouter>; - auto scanner = scanners::terminal_scanner<decltype(sink), terminal_policy>{sink}; + auto scanner = scanners::terminal_scanner<decltype(sink), TerminalPolicy>{sink}; auto raw_buffer = std::array<char, 64>{}; |
