mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 21:37:35 +00:00
Import all this stuff into a single repo called Serenity.
This commit is contained in:
commit
5a30055157
67 changed files with 8836 additions and 0 deletions
25
AK/Traits.h
Normal file
25
AK/Traits.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<typename T>
|
||||
struct Traits
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Traits<int> {
|
||||
static unsigned hash(int i) { return i; }
|
||||
static void dump(int i) { printf("%d", i); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Traits<unsigned> {
|
||||
static unsigned hash(unsigned u) { return u; }
|
||||
static void dump(unsigned u) { printf("%u", u); }
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue