From 421ae75fa94a05b71c03255af4ad597a60fc8ed9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 8 Mar 2024 01:17:11 +0000 Subject: Rework stream support to work with any collection --- test/test-static-stream_support.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'test/test-static-stream_support.cpp') diff --git a/test/test-static-stream_support.cpp b/test/test-static-stream_support.cpp index 3002ccc..6bf9ea4 100644 --- a/test/test-static-stream_support.cpp +++ b/test/test-static-stream_support.cpp @@ -1,11 +1,20 @@ #include "stream_support.h" #include +#include +#include #include -static_assert(spanable>); -static_assert(spanable>); -static_assert(spanable>); -static_assert(spanable>); -static_assert(!spanable); -static_assert(!spanable); +static_assert(NonStringIterableCollection>); +static_assert(NonStringIterableCollection>); +static_assert(NonStringIterableCollection>); +static_assert(NonStringIterableCollection>); +static_assert(NonStringIterableCollection>); +static_assert(NonStringIterableCollection>); +static_assert(!NonStringIterableCollection); +static_assert(!NonStringIterableCollection); + +static_assert(requires(std::vector i, std::ostream & o) { o << i; }); +static_assert(requires(std::array i, std::ostream & o) { o << i; }); +static_assert(requires(std::set i, std::ostream & o) { o << i; }); +static_assert(requires(std::map i, std::ostream & o) { o << i; }); -- cgit v1.2.3