Original Post
Hi all. I was reading over this page: http://www.drizzle.com/~scottb/publish/gpgems1_singleton.htm but I'm a little bit confused as to what the purpose of the following two lines are in the constructor: int offset = (int)(T*)1 - (int)(Singleton *)(T*)1; ms_Singleton = (T*)((int)this + offset); The explanation at the bottom of the page doesn't make sense to me. Can anyone explain this in a little more detail as to why this is needed? Thanks!