Should I be depending on there being a class definition for every instance?


#1

I noticed that the generated patch code contains a class definition for every patcher object instance, not for every patcher object type. This was a little surprising to me, but I assume there is some reason. Is it to avoid using new/malloc?

And now I'm making an object where I use some "clever" preprocessor tricks (__COUNT__ macro in the local data section) to make the patch #error if you make too many instances of another object. This, however, depends on there being a class definition for each instance. I realize this is in poor taste but I was wondering if I can depend on this structure or the patches might quietly shift to class-per-type instead of class-per-instance?