All right! It's good to know that you can offset a pointer with an int.
I also like the idea of offsets relative to the position of the offset, although I wonder what would happen if you had a negative offset;
Theoretically it wouldn't matter and would still work.
Now, regarding the custom deleter, the deleter would call a "delete" function of the model, correct?
Would it then cast the Model* to a char* before finally calling delete[] foochar?
I assume the deleter would look something like this:
void DeleteModel( *Model)
{
Model->Shutdown();
delete[] (char*)Model;
}
Thankyou.
EDIT:
Your offset template is a really good idea!
It took me a moment to understand what it was doing - still new to C++