summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-03-06 14:01:52 +0000
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2026-03-06 14:01:52 +0000
commit28e1b2d2bfd8c3228b42a151aa746306bd8024ab (patch)
treeb545c22db51df1418a1d4bc2878d3828afaa957d
parentAdd vertexAttribFormatFunc to gl_traits for DSA vertex configuration (diff)
downloadilt-28e1b2d2bfd8c3228b42a151aa746306bd8024ab.tar.bz2
ilt-28e1b2d2bfd8c3228b42a151aa746306bd8024ab.tar.xz
ilt-28e1b2d2bfd8c3228b42a151aa746306bd8024ab.zip
Define SequentialCollection in terms of contiguous_range
-rw-r--r--lib/collections.h6
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())>;