yu ~master (2017-08-14T10:07:44Z)
Dub
Repo
ArrayCOWData
yu
container
common
Array Cow Data
struct
ArrayCOWData (
T
Allocator
bool
inGC
= false
)
if
(
is
(
T
==
Unqual
!
T
)
) {
import
core
.
memory
:
GC
;
;
import
std
.
exception
:
enforce
;
;
import
core
.
stdc
.
string
:
memcpy
;
;
void
fillWithMemcpy
(void[] array, T filler) via
import
yu
.
array
:
fillWithMemcpy
;
;
~this
();
bool
reserve
(size_t elements);
void
destoryBuffer
();
alias
_alloc
=
Allocator
.
instance
;
static if
(!(
StaticAlloc!Allocator
))
Allocator
_alloc
;
T
[]
data
;
mixin
Refcount
!()
;
}
Destructor
~this
~this
()
Undocumented in source.
Members
Aliases
_alloc
alias
_alloc
=
Allocator
.
instance
Undocumented in source.
Functions
destoryBuffer
void
destoryBuffer
()
Undocumented in source. Be warned that the author may not have intended to support it.
reserve
bool
reserve
(size_t elements)
Undocumented in source. Be warned that the author may not have intended to support it.
Mixins
__anonymous
mixin
Refcount
!()
Undocumented in source.
Variables
_alloc
Allocator
_alloc
;
Undocumented in source.
data
T
[]
data
;
Undocumented in source.
Meta
Source
See Implementation
yu
container
common
mixin templates
AllocDefine
Refcount
structs
ArrayCOWData
RefCount
templates
StaticAlloc
Array Cow Data