Thank you @Ali and @Jonothan!
So essentially since I will be storing a pointer, Telemetry!(T) is NOT safe
to use only with structs in general.
If I have something like:
struct UsefulStruct2
{
this(this) @disable;
this(UsefulStruct2) @disable;
this(ref const(UsefulStruct2)) @disable;
ref UsefulStruct2 opAssign(UsefulStruct2) @disable;
ref UsefulStruct2 opAssign(ref const(UsefulStruct2)) @disable;
int importantValue;
auto tel1 = Telemetry!int(importantValue);
}
Does that ensure that UsefulStruct2 is not relocateable and thus I can
safely store a pointer to importantValue?
If not, what constraints do I need to add to my classes to ensure that I
don't run into subtle bugs when structs relocate?
Regards,
Saurabh Das