mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05: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…
Reference in a new issue