xalloc

Allocates memory for a class and emplaces it.

pure nothrow @system @nogc
T
xalloc
(
T
E...
)
(
auto ref E args
)
if (
is(T == class)
)

Examples

t {

	class Test {

		int a, b, c;

	}

	Test test;
	assert(test is null);

	test = xalloc!Test();
	assert(test !is null)

Meta