I usually regard this as a pitfall in C++ more than a feature, but, if it fits your application, you can just use pointer values.
#include
Which is really just a simpler version of this other answer (obviously you may choose between shared_ptr
/ unique_ptr
as needed).