I have a situation where I have two identical storage containers:
Since these are unique structs, but the contents just appear to be the same, then create a template function instead of casting, and inside that function, you work strictly with the contents of the object that's passed.
Now it doesn't matter what you pass, as long as what is passed satisfies the code in the template function. The T1 and T2 in your example would be SQVector4 and SQMatrix4, respectively.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; October 27th, 2012 at 06:14 PM.
Bookmarks