auto allocator = TestAllocator(); { auto ptr = RefCounted!(Struct, TestAllocator*)(&allocator, 5); Struct.numStructs.shouldEqual(1); } Struct.numStructs.shouldEqual(0);
See Implementation