mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
26 lines
371 B
C
26 lines
371 B
C
|
#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); }
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|