diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test-static-stream_support.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
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 <array> +#include <map> +#include <set> #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>); +static_assert(NonStringIterableCollection<std::vector<int>>); +static_assert(NonStringIterableCollection<std::set<int>>); +static_assert(NonStringIterableCollection<std::map<int, int>>); +static_assert(NonStringIterableCollection<std::vector<char>>); +static_assert(NonStringIterableCollection<std::array<int, 1>>); +static_assert(NonStringIterableCollection<std::array<char, 1>>); +static_assert(!NonStringIterableCollection<std::string>); +static_assert(!NonStringIterableCollection<std::string_view>); + +static_assert(requires(std::vector<int> i, std::ostream & o) { o << i; }); +static_assert(requires(std::array<int, 10> i, std::ostream & o) { o << i; }); +static_assert(requires(std::set<int> i, std::ostream & o) { o << i; }); +static_assert(requires(std::map<int, int> i, std::ostream & o) { o << i; }); |