Boost provides a relative offset pointer (boost::interprocess::offset_ptr) which can be used in place of regular of a raw pointer in STL containers with an appropriate allocator (see this question for one reason why this is useful).
A concise explanation of how this type of pointer can be implemented (taken from this not boost specific answer) is:
template<class T> class offset_ptr {
size_t offset; public:
T* operator->() { return reinterpret_cast<T*>(reinterpret_cast<char*>(this)+offset); } };
This is very clever. It enables you to use containers in shared memory and to persist structures to disk.
This idea is very old, very clever, very simple and very useful. This begs the question why is there no such pointer provided in the current ISO C++ standard.
Allocator_traits supports providing your own pointer types in place of a raw pointer.
boost::interprocess::offset_ptr
is even explicitly referenced on cppreference as a good example of why allocator traits allows this.
What obstacles remain to adding such a type?
See also:
Towards meaningful fancy pointers explores this but does not quite explain it.