Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Simplifed version of std::span (C++20) as we don't support the original one yet. More...
#include <Span.h>
Public Types | |
using | element_type = T |
using | value_type = std::remove_cv_t< T > |
using | size_type = size_t |
using | pointer = T * |
using | reference = T & |
using | iterator = pointer |
Public Member Functions | |
constexpr | span () |
constexpr | span (iterator first, size_type extent) |
constexpr | span (iterator first, iterator last) |
template<typename OtherT , size_t N> | |
constexpr | span (const std::array< OtherT, N > &arr) |
template<typename ContinuousRange > | |
constexpr | span (ContinuousRange &range) |
constexpr | span (const span &other)=default |
constexpr span & | operator= (const span &other)=default |
~span ()=default | |
constexpr size_type | size () const |
constexpr bool | empty () const |
constexpr reference | operator[] (size_type index) const |
constexpr pointer | data () const |
constexpr iterator | begin () const |
constexpr iterator | end () const |
constexpr span | subspan (size_type offset) const |
Private Attributes | |
pointer | m_Pointer |
size_type | m_Extent |
Simplifed version of std::span (C++20) as we don't support the original one yet.
The naming intentionally follows the STL version to make the future replacement easier with less blame changing. It supports only very basic subset of std::span functionality. TODO: remove as soon as std::span become available.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
constexprdefault |
|
inlineconstexpr |
|
inlineconstexpr |