From adf2e1bd57abda94a2b969db0beed1d068298f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Sat, 4 Jan 2025 17:06:47 -0500 Subject: [PATCH] concepts: define note port --- include/avnd/concepts/note_port.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/avnd/concepts/note_port.hpp diff --git a/include/avnd/concepts/note_port.hpp b/include/avnd/concepts/note_port.hpp new file mode 100644 index 00000000..0c0e5d66 --- /dev/null +++ b/include/avnd/concepts/note_port.hpp @@ -0,0 +1,25 @@ +#pragma once + +/* SPDX-License-Identifier: GPL-3.0-or-later OR BSL-1.0 OR CC0-1.0 OR CC-PDCC OR 0BSD */ + +#include +#include +#include + +namespace avnd +{ + +// Note ports +// FIXME MPE, etc. +template +concept note_port = requires(T t) { t.notes; }; + +template +concept dynamic_container_notes = note_port && vector_ish; + +template +concept raw_container_note_port + = note_port && std::is_pointer_v + && std::is_integral_v; + +}