summaryrefslogtreecommitdiff
path: root/lib/stream_support.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-08-29 12:54:18 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-08-29 12:54:18 +0100
commit8dfe3d339dc1542ee7bd59c000302765648e972c (patch)
tree791e61bfe13cdee69206478317cfcf1170412ff0 /lib/stream_support.cpp
parentUse utf8_string_view for processing text to renderings (diff)
downloadilt-8dfe3d339dc1542ee7bd59c000302765648e972c.tar.bz2
ilt-8dfe3d339dc1542ee7bd59c000302765648e972c.tar.xz
ilt-8dfe3d339dc1542ee7bd59c000302765648e972c.zip
Generic solution for streaming collections that can be spanned
Diffstat (limited to 'lib/stream_support.cpp')
-rw-r--r--lib/stream_support.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/stream_support.cpp b/lib/stream_support.cpp
new file mode 100644
index 0000000..2054873
--- /dev/null
+++ b/lib/stream_support.cpp
@@ -0,0 +1,11 @@
+#include "stream_support.hpp"
+
+#include <array>
+#include <vector>
+
+static_assert(spanable<std::vector<int>>);
+// static_assert(spanable<std::vector<char>>);
+static_assert(spanable<std::array<int, 1>>);
+// static_assert(spanable<std::array<char, 1>>);
+static_assert(!spanable<std::string>);
+static_assert(!spanable<std::string_view>);