MutableData

Description

Obtains the pointer address of the first element. The data in [MutableData(), reinterpret_cast<T *>(MutableData()) + GetSize()) is the data stored in the current container.

Compared with GetData, the content pointed by the pointer address can be modified.

Prototype

void *MutableData()

Parameters

None

Returns

Pointer address of the first element

Restrictions

None

Example

size_t capacity = 100U;
auto cv_holder = ContinuousVector::Create<int64_t>(capacity);
auto cv = reinterpret_cast<ContinuousVector *>(cv_holder.get());
auto cap = cv->MutableData();