If you do not provide or declare an assignment operator/copy constructor, the compiler will create one for you that does a byte-wise copy. If you had pointers to data, then this will result in a shallow copy. If you delete that memory in the destructor, then the data is gone after sprite::Build() was called.
Thats why I took the address of the viewport, without making a copy.
You can also use a reference:
viewport& Viewport = (CurrentContext->CurrentState()->Viewport);Viewport.*(Viewport.TransformVertices))(vertices);
Just make sure that you don't make a copy, i.e. by declaring the assignement operator and copy constructor private (or define them properly):
class viewport {private:viewport(const viewport& other); // copy constructorviewport& operator= (const viewport& other); // assignment operator...};