mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
Support arbitrary pointer traits.
This commit is contained in:
parent
5e5f5f60e3
commit
c37ded0ae4
1 changed files with 6 additions and 0 deletions
|
@ -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); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue