folly::attach

attach overloads

Synopses

Declared in <folly/container/FBVector.h>

Grants the free attach function access to the vector internals.

void
attach(
    fbvector<_T, _A>& v,
    _T* data,
    size_t sz,
    size_t cap);
» more...

Attach externally-owned storage to a fresh vector.

template<
    class T,
    class A>
void
attach(
    fbvector<T, A>& v,
    T* data,
    size_t sz,
    size_t cap);
» more...

Parameters

NameDescription
vThe vector to attach storage to; must be empty.
dataPointer to the external storage.
szThe number of constructed elements in the storage.
capThe capacity of the storage.