Based Pointers
One of the more curious C/C++ extensions I have come across is from Microsoft in the form of __based pointers. Unlike a traditional pointer, a based (on) pointer represents a memory address relative to another.
void *base;
;
If the above example were to be compiled targeting x86, pointer would store a 32-bit integer representing an offset from base. How can we make this more portable?
template<>