27 #ifndef MLN_VALUE_BUILTIN_INTEGERS_HH
28 # define MLN_VALUE_BUILTIN_INTEGERS_HH
34 # include <mln/value/internal/limits.hh>
36 # include <mln/value/concept/built_in.hh>
37 # include <mln/value/concept/integer.hh>
38 # include <mln/trait/value_.hh>
40 # include <mln/metal/int.hh>
41 # include <mln/metal/if.hh>
42 # include <mln/metal/bool.hh>
48 template <>
struct category<
unsigned char > {
typedef value::Built_In< value::Integer<void> >
ret; };
49 template <>
struct category< signed char > {
typedef value::Built_In< value::Integer<void> >
ret; };
50 template <>
struct category<
unsigned short > {
typedef value::Built_In< value::Integer<void> >
ret; };
51 template <>
struct category< signed short > {
typedef value::Built_In< value::Integer<void> >
ret; };
53 template <>
struct category< signed
int > {
typedef value::Built_In< value::Integer<void> >
ret; };
54 template <>
struct category<
unsigned long > {
typedef value::Built_In< value::Integer<void> >
ret; };
55 template <>
struct category< signed long > {
typedef value::Built_In< value::Integer<void> >
ret; };
70 enum { n = 8 *
sizeof(E) };
76 card = mln_value_card_from_(n)
79 typedef trait::value::nature::integer nature;
80 typedef trait::value::kind::data kind;
81 typedef mln_value_quant_from_(card) quant;
93 template <>
struct value_<
unsigned char >
94 : internal::value_integer_< unsigned char >
96 static const char* name()
97 {
return "unsigned char"; }
100 template <>
struct value_< signed char >
101 : internal::value_integer_< signed char >
103 static const char* name()
104 {
return "signed char"; }
107 template <>
struct value_< char >
108 : internal::value_integer_< signed char >
110 static const char* name()
114 template <>
struct value_<
unsigned short >
115 : internal::value_integer_< unsigned short >
117 static const char* name()
118 {
return "unsigned short"; }
121 template <>
struct value_< signed short >
122 : internal::value_integer_< signed short >
124 static const char* name()
125 {
return "signed short"; }
129 : internal::value_integer_< unsigned int >
131 static const char* name()
132 {
return "unsigned int"; }
135 template <>
struct value_< signed
int >
136 : internal::value_integer_< signed int >
138 static const char* name()
139 {
return "signed int"; }
142 template <>
struct value_<
unsigned long >
143 : internal::value_integer_< unsigned long >
145 static const char* name()
146 {
return "unsigned long"; }
149 template <>
struct value_< signed long >
150 : internal::value_integer_< signed long >
152 static const char* name()
153 {
return "signed long"; }
161 #endif // ! MLN_VALUE_BUILTIN_INTEGERS_HH