Struct vector

Simple bindings from std::vector

struct vector(T, Alloc) ;

Note that this binding is incomplete and possibly incorrect. There is a druntime version but it's likely buggy and much harder to reason about because it supports all runtimes:

Methods

NameDescription
push_back (value) Overload for basic types to not require a const ref
reserve () Set vector capacity

Inner structs

NameDescription
ConstIterator

https

//github.com/dlang/druntime/pull/2448

It's very easy to get the memory management wrong, so prefer passing this by ref and do anything that modifies the memory on the C++ side (e.g. push_back).

Extra items, like ConstIterator and toString / fromString are for ease of use (e.g. to/fromString actually allows vibe.d to deserialize it)