Enum member isIntrusive

Return number of ControlBlocks in type Type.

enum isIntrusive(Type) = impl;

IntrusivePtr need exact 1 control block.

Example

static assert(isIntrusive!long == 0);

static assert(isIntrusive!(ControlBlock!int) == 0);

static class Foo{
	long x;
	ControlBlock!int control;
}

static assert(isIntrusive!Foo == 1);

static struct Struct{
	long x;
	ControlBlock!int control;
	Foo foo;
}
static assert(isIntrusive!Struct == 1);


static class Bar : Foo{
	const ControlBlock!int control2;
	Struct s;

}
static assert(isIntrusive!Bar == 2);


static class Zee{
	long l;
	double x;
	Struct str;
}
static assert(isIntrusive!Zee == 0);