aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/alspan.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/alspan.h b/common/alspan.h
index 60a2bc4a..6a43b32a 100644
--- a/common/alspan.h
+++ b/common/alspan.h
@@ -249,9 +249,9 @@ public:
constexpr span last(size_t count) const
{ return (count >= size()) ? *this : span{mDataEnd-count, mDataEnd}; }
- template<size_t O, size_t C>
+ template<size_t O, size_t C=dynamic_extent>
constexpr span<element_type,C> subspan() const
- { return span<element_type,C>{mData+O, C}; }
+ { return span<element_type,C>{mData+O, (C!=dynamic_extent) ? mData+C : mDataEnd}; }
constexpr span subspan(size_t offset, size_t count=dynamic_extent) const
{