diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-06 14:01:52 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-06 14:01:52 +0000 |
| commit | 28e1b2d2bfd8c3228b42a151aa746306bd8024ab (patch) | |
| tree | b545c22db51df1418a1d4bc2878d3828afaa957d /lib | |
| parent | Add vertexAttribFormatFunc to gl_traits for DSA vertex configuration (diff) | |
| download | ilt-28e1b2d2bfd8c3228b42a151aa746306bd8024ab.tar.bz2 ilt-28e1b2d2bfd8c3228b42a151aa746306bd8024ab.tar.xz ilt-28e1b2d2bfd8c3228b42a151aa746306bd8024ab.zip | |
Define SequentialCollection in terms of contiguous_range
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/collections.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/collections.h b/lib/collections.h index e182af5..3c80125 100644 --- a/lib/collections.h +++ b/lib/collections.h @@ -10,10 +10,8 @@ #include <vector> template<typename T, typename E> -concept SequentialCollection = requires(T c) { - { c.size() } -> std::integral; - { c.data() } -> std::same_as<const E *>; -}; +concept SequentialCollection + = std::ranges::contiguous_range<T> && std::is_same_v<const E, const typename T::value_type>; template<typename T> concept IterableCollection = std::is_same_v<decltype(std::declval<T>().begin()), decltype(std::declval<T>().end())>; |
