isNullSettable

Checks if type is settable to null

template isNullSettable () {}

Members

Manifest constants

isNullSettable
enum isNullSettable;
Undocumented in source.

Parameters

T

type or typeof a variable

Examples

assertTrue(isNullSettable!IUnittestTestClass);
assertTrue(isNullSettable!UnittestTestClass);
assertTrue(isNullSettable!(int[]));
assertTrue(isNullSettable!(int[string]));
assertTrue(isNullSettable!(typeof(null)));
assertTrue(isNullSettable!(int*));
assertTrue(isNullSettable!(void function()));
assertTrue(isNullSettable!(void delegate()));

assertFalse(isNullSettable!int);
assertFalse(isNullSettable!float);
assertFalse(isNullSettable!double);
assertFalse(isNullSettable!bool);
assertFalse(isNullSettable!real);
assertFalse(isNullSettable!UnittestTestStruct);

struct Struct1
{
	void opAssign(int*)
	{
	}
}

assertTrue(isNullSettable!Struct1);

struct Struct3
{
	@disable this();
	void opAssign(int*)
	{
	}
}

assertTrue(isNullSettable!Struct3);

Meta