diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-06-19 19:25:30 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-06-19 19:25:30 +0200 |
| commit | 7da39cd68d2bed2f49452ac5f9a3c01c52d0c5ba (patch) | |
| tree | a2c2adc18bc5bdaa1e1e2f80e75d1acbce78d7bb /ttwhy/scanners/concepts.cppm | |
| parent | b198d40e35050c8692296f06acedfaf5e3c8a023 (diff) | |
| download | ttwhy-7da39cd68d2bed2f49452ac5f9a3c01c52d0c5ba.tar.xz ttwhy-7da39cd68d2bed2f49452ac5f9a3c01c52d0c5ba.zip | |
lib: clean up structure
Diffstat (limited to 'ttwhy/scanners/concepts.cppm')
| -rw-r--r-- | ttwhy/scanners/concepts.cppm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ttwhy/scanners/concepts.cppm b/ttwhy/scanners/concepts.cppm new file mode 100644 index 0000000..003874c --- /dev/null +++ b/ttwhy/scanners/concepts.cppm @@ -0,0 +1,18 @@ +module; + +#include <concepts> +#include <span> + +export module ttwhy.scanners:concepts; + +namespace ttwhy +{ + + export template<typename Candidate> + concept scanner = requires(Candidate a, std::span<char const> buffer) { + { a.process(buffer) } -> std::same_as<void>; + { a.timeout() } -> std::same_as<void>; + { a.is_pending() } -> std::same_as<bool>; + }; + +} // namespace ttwhy |
