|
constexpr | MemorySpan ()=default |
|
constexpr | MemorySpan (std::nullptr_t, size_t) |
|
template<typename Iterator , std::enable_if_t< is_compatible_iterator_v< Iterator >, bool > = true> |
constexpr | MemorySpan (Iterator first, size_t count) |
|
template<typename Iterator , std::enable_if_t< is_compatible_iterator_v< Iterator > &&!std::is_convertible_v< Iterator, size_t >, bool > = true> |
constexpr | MemorySpan (Iterator first, Iterator last) |
|
template<size_t N> |
constexpr | MemorySpan (T(&a)[N]) noexcept |
|
template<typename U , size_t N, std::enable_if_t< is_array_convertible_v< U, T >, bool > = true> |
constexpr | MemorySpan (std::array< U, N > &a) noexcept |
|
template<typename U , size_t N, std::enable_if_t< is_array_convertible_v< const U, T >, bool > = true> |
constexpr | MemorySpan (const std::array< U, N > &a) noexcept |
|
constexpr T * | data () const |
|
constexpr size_t | size () const |
|
constexpr T & | operator[] (size_t i) const |
|
constexpr bool | empty () const |
|
Iterator | begin () const |
|
Iterator | end () const |
|
template<typename T>
class v8::MemorySpan< T >
Points to an unowned contiguous buffer holding a known number of elements.
This is similar to std::span (under consideration for C++20), but does not require advanced C++ support. In the (far) future, this may be replaced with or aliased to std::span.
To facilitate future migration, this class exposes a subset of the interface implemented by std::span.