My Project
V8 API Reference Guide generated from the header files
Public Member Functions
v8::MemorySpan< T > Class Template Reference

#include <v8.h>

Public Member Functions

constexpr MemorySpan ()=default
 
constexpr MemorySpan (T *data, size_t size)
 
constexpr T * data () const
 
constexpr size_t size () const
 

Detailed Description

template<typename T>
class v8::MemorySpan< T >

Points to an unowned continous 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.

Constructor & Destructor Documentation

◆ MemorySpan()

template<typename T>
constexpr v8::MemorySpan< T >::MemorySpan ( )
default

The default constructor creates an empty span.

Member Function Documentation

◆ data()

template<typename T>
constexpr T* v8::MemorySpan< T >::data ( ) const
inline

Returns a pointer to the beginning of the buffer.

◆ size()

template<typename T>
constexpr size_t v8::MemorySpan< T >::size ( ) const
inline

Returns the number of elements that the buffer holds.


The documentation for this class was generated from the following file: