x::refs and x::ptrsstd::map<x::ref<myObj>, int> ref_map; #include <x/refptrhash.H> std::unordered_map<x::ref<myObj>, int> ref_unordered_map;
x::refs and x::ptrs support comparison operators.
x::ref (and x::ptrs and x::const_refs
and x::const_refs) can be compared with
each other (if the types match) for equality, or strict weak ordering.
For unordered containers, use
refptrhash.H header file to define the
required specializations of std::hash.