BAN: Implement basic Span
This is wrapper over contiguous block of memory e.g. Vector
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <BAN/Math.h>
|
||||
#include <BAN/Memory.h>
|
||||
#include <BAN/Move.h>
|
||||
#include <BAN/Span.h>
|
||||
|
||||
namespace BAN
|
||||
{
|
||||
@@ -52,6 +53,9 @@ namespace BAN
|
||||
|
||||
bool contains(const T&) const;
|
||||
|
||||
Span<T> span() { return Span(m_data, m_size); }
|
||||
const Span<T> span() const { return Span(m_data, m_size); }
|
||||
|
||||
const T& operator[](size_type) const;
|
||||
T& operator[](size_type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user