35 template<
int base,
int a0>
37 template<
int base,
int a0,
int a1>
39 template<
int base,
int a0,
int a1,
int a2>
41 template<
int base,
int a0,
int a1,
int a2,
int a3>
43 template<
int base,
int a0,
int a1,
int a2,
int a3,
int a4>
45 template<
int base,
int a0,
int a1,
int a2,
int a3,
int a4,
int a5>
49 template<
int a0,
int a1,
int a2,
int a3>
55 template<
int a0,
int a1>
57 template<
int a0,
int a1,
int a2>
59 template<
int a0,
int a1,
int a2,
int a3>
61 template<
int a0,
int a1,
int a2,
int a3,
int a4>
67 template<
int a0,
int a1>
69 template<
int a0,
int a1,
int a2>
71 template<
int a0,
int a1,
int a2,
int a3>
73 template<
int a0,
int a1,
int a2,
int a3,
int a4>
75 template<
int a0,
int a1,
int a2,
int a3,
int a4,
int a5>
81 template<
typename T1,
typename T2>
struct if_then_else<true, T1, T2> {
typedef T1
Type;};
82 template<
typename T1,
typename T2>
struct if_then_else<false, T1, T2> {
typedef T2
Type;};
85 template<
int c>
struct is_num {
enum { value = c >= 48 && c <= 57 };};
87 template<
int c>
struct is_dot {
enum { value = c == 46 };};
88 struct lower_letter_t;
struct upper_letter_t;
struct number_t;
struct underline_t;
struct dot_t;
90 template<
int x>
struct map64_helper<x, number_t> {
enum { value = x-48}; };
91 template<
int x>
struct map64_helper<x, upper_letter_t> {
enum { value = x-65+10}; };
92 template<
int x>
struct map64_helper<x, lower_letter_t> {
enum { value = x-97+10+26}; };
93 template<
int x>
struct map64_helper<x, underline_t> {
enum { value = 62}; };
94 template<
int x>
struct map64_helper<x, dot_t> {
enum { value = 63}; };
95 struct invalid_char_must_be_number_26letters_underline_dot;
104 invalid_char_must_be_number_26letters_underline_dot>::Type>::Type>::Type>::Type>::Type>::value
108 template<
int x>
struct map36_helper<x, number_t> {
enum { value = x-48}; };
109 template<
int x>
struct map36_helper<x, upper_letter_t> {
enum { value = x-65+10}; };
110 template<
int x>
struct map36_helper<x, lower_letter_t> {
enum { value = x-97+10}; };
111 struct invalid_char_must_be_number_26letters;
118 invalid_char_must_be_number_26letters>::Type>::Type>::Type>::value
124 struct map_identical_t;
132 map_identical_t>::Type>::Type>::value
T1 Type
Definition: mkid.h:81
Example: int id1 = mkid::fourcc<'H', 'E', 'V', 'C'>::value; int id2 = mkid::id32base64_5<'H', 'e', 'l', 'l', 'o'>::value; int id3 = mkid::id32base36_6<'M', 'r', 'W', 'a', 'n', 'g'>::value; For (u)int32 result, base 64 accepts at most 5 characters, while base 36 accepts at most 6 characters.
Definition: mkid.h:30
T2 Type
Definition: mkid.h:82