8 template <
typename T>
class uuid_ptr {
10 typedef typename std::remove_const<T>::type T_without_const;
13 uuid_ptr() : ptr(nullptr)
16 uuid_ptr(
const UUID &uu) : ptr(nullptr), uuid(uu)
19 uuid_ptr(T *p,
const UUID &uu) : ptr(p), uuid(uu)
22 uuid_ptr(T *p) : ptr(p), uuid(p ? p->get_uuid() : UUID())
33 assert(ptr->get_uuid() == uuid);
43 assert(ptr->get_uuid() == uuid);
53 assert(ptr->get_uuid() == uuid);
61 void update(std::map<UUID, T> &map)
64 if (map.count(uuid)) {
72 void update(
const std::map<UUID, T_without_const> &map)
75 if (map.count(uuid)) {