vector

struct vector (
T
Alloc = allocator!T
) {}

Constructors

this
this()

MSVC allocates on default initialisation in debug, which can't be modelled by D struct

this
this(DefaultConstruct)
this
this(size_t count)
this
this(size_t count, auto ref T val)
this
this(T[] array)

Destructor

~this
~this()

Postblit

this(this)
this(this)

Members

Aliases

allocator_type
alias allocator_type = Alloc
const_pointer
alias const_pointer = const(T)*
difference_type
alias difference_type = ptrdiff_t
length
alias length = size
opDollar
alias opDollar = length
pointer
alias pointer = T*
size_type
alias size_type = size_t
value_type
alias value_type = T

Functions

append
void append(T[] array)
as_array
inout(T)[] as_array()
at
inout(T) at(size_type i)
back
inout(T) back()
capacity
size_type capacity()
clear
void clear()
data
inout(T)* data()
emplace_back
T emplace_back(auto ref Args args)
empty
bool empty()
front
inout(T) front()
get_allocator
inout(Alloc) get_allocator()
insert
void insert(size_t offset, T[] array)
max_size
size_type max_size()
opAssign
vector opAssign(auto ref vector!(U, Alloc) s)
opAssign
vector opAssign(T[] array)
opIndex
inout(T) opIndex(size_t index)
opIndex
inout(T)[] opIndex(size_t[2] slice)
opIndex
inout(T)[] opIndex()
opIndexAssign
void opIndexAssign(auto ref T val, size_t index)
opIndexAssign
void opIndexAssign(auto ref T val, size_t[2] slice)
opIndexAssign
void opIndexAssign(T[] val, size_t[2] slice)
opIndexAssign
void opIndexAssign(auto ref T val)
opIndexAssign
void opIndexAssign(T[] val)
opIndexOpAssign
void opIndexOpAssign(auto ref T val, size_t index)
opIndexOpAssign
void opIndexOpAssign(auto ref T val, size_t[2] slice)
opIndexOpAssign
void opIndexOpAssign(T[] val, size_t[2] slice)
opIndexOpAssign
void opIndexOpAssign(auto ref T val)
opIndexOpAssign
void opIndexOpAssign(T[] val)
opOpAssign
vector opOpAssign(auto ref T item)
opOpAssign
vector opOpAssign(T[] array)
opSlice
size_t[2] opSlice(size_t start, size_t end)
pop_back
void pop_back()
push_back
void push_back(auto ref U element)
reserve
void reserve(const size_type newCapacity)
resize
void resize(const size_type newsize)
resize
void resize(const size_type newsize, auto ref T val)
shrink_to_fit
void shrink_to_fit()
size
size_type size()
Suggestion Box / Bug Report