STL containers always contain copies of an object, and this also applies to map keys.
The easiest way to support this is to use a custom comparator for the map.
struct UUIDComparator { bool operator()(const uuid_t &a, const uuid_t &b) {
Another slightly inconsistent solution would be to convert uuid_t to std::pair<uint64_t, uint64_t> , since both types are 128 bits wide and AFAICT compatible with layouts. And std::pair can be used directly as map keys.
std::map<std::pair<uint64_t, uint64_t>, int, UUIDComparator> map;
source share