BAN: Implement basic Span

This is wrapper over contiguous block of memory e.g. Vector
This commit is contained in:
Bananymous
2023-03-20 13:28:01 +02:00
parent ef381d0600
commit 70f2908056
3 changed files with 120 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
#include <BAN/Errors.h>
#include <BAN/Iterators.h>
#include <BAN/Span.h>
#include <stddef.h>
@@ -34,6 +35,9 @@ namespace BAN
const T& front() const;
T& front();
Span<T> span() { return Span(m_data, size()); }
const Span<T> span() const { return Span(m_data, size()); }
constexpr size_type size() const;
private: