x::ref
s and x::ptr
sstd::map<x::ref<myObj>, int> ref_map; #include <x/refptrhash.H> std::unordered_map<x::ref<myObj>, int> ref_unordered_map;
x::ref
s and x::ptr
s support comparison operators.
x::ref
(and x::ptr
s and x::const_ref
s
and x::const_ref
s) 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
.