Support arbitrary pointer traits.

This commit is contained in:
Andreas Kling 2018-10-11 16:52:30 +02:00
parent 5e5f5f60e3
commit c37ded0ae4
Notes: sideshowbarker 2024-07-19 18:50:48 +09:00

View file

@ -21,5 +21,11 @@ struct Traits<unsigned> {
static void dump(unsigned u) { printf("%u", u); }
};
template<typename T>
struct Traits<T*> {
static unsigned hash(const T* p) { return (unsigned)p; }
static void dump(const T* p) { printf("%p", p); }
};
}