mustAddGCRange

Indicates if an aggregate contains members that might be collected by the garbage collector. This is used in constructors to determine if the content of a manually allocated aggregate must be declared to the GC.

Members

Manifest constants

mustAddGCRange
enum mustAddGCRange;
Undocumented in source.
mustAddGCRange
enum mustAddGCRange;
Undocumented in source.
mustAddGCRange
enum mustAddGCRange;
Undocumented in source.
mustAddGCRange
enum mustAddGCRange;
Undocumented in source.
mustAddGCRange
enum mustAddGCRange;
Undocumented in source.
mustAddGCRange
enum mustAddGCRange;
Undocumented in source.

Examples

@NoGc int[] slice;
import std.traits : hasUDA;
static assert(hasUDA!(slice, NoGc));
/+ TODO: static assert(!mustAddGCRange!(typeof(slice))); +/
static assert(!mustAddGCRange!int);
static assert(mustAddGCRange!(int*));
static assert(mustAddGCRange!(int*[1]));
static assert(!mustAddGCRange!(int*[0]));
static assert(mustAddGCRange!(int[]));

Meta