34 #ifndef __CLAW_TYPES_HPP__
35 #define __CLAW_TYPES_HPP__
39 #ifdef CLAW_HAS_LONG_LONG
42 meta::type_list<signed long long int, meta::no_type>
43 non_standard_signed_types;
46 meta::type_list<unsigned long long int, meta::no_type>
47 non_standard_unsigned_types;
49 #else // !def CLAW_HAS_LONG_LONG
51 typedef meta::no_type non_standard_signed_types;
52 typedef meta::no_type non_standard_unsigned_types;
54 #endif // CLAW_HAS_LONG_LONG
57 typedef meta::type_list
61 meta::type_list<signed int, non_standard_signed_types>
80 template<std::
size_t Size,
typename TypeList>
84 typedef typename TypeList::head_type head_type;
85 typedef typename TypeList::queue_type queue_type;
92 <
sizeof(head_type) * 8 == Size, head_type,
98 template<std::
size_t Size>
112 template<std::
size_t Size>
126 template<std::
size_t Size>
154 #endif // __CLAW_TYPES_HPP__
Define the type of a signed integer stored with a given number of bits. Template parameters.
This meta class finds, in a list of types, the first type stored exactly with a given number of bits...
unsigned_integer_of_size< 32 >::type u_int_32
An unsigned integer on 32 bits.
Define the type of an unsigned integer stored with a given number of bits. Template parameters...
find_type_by_size< Size, signed_integers >::type type
The integer type that matches the given size.
Structures for meta-programming.
unsigned_integer_of_size< 8 >::type u_int_8
An unsigned integer on 8 bits.
meta::if_then_else< sizeof(head_type)*8==Size, head_type, typename find_type_by_size< Size, queue_type >::type >::result type
If the size of head_type matches the desired one, then the result is head_type, otherwise we search t...
meta::type_list< signed char, meta::type_list< signed short, meta::type_list< signed int, non_standard_signed_types > > > signed_integers
This is the list of c++ signed integer types.
meta::type_list< unsigned char, meta::type_list< unsigned short, meta::type_list< unsigned int, non_standard_unsigned_types > > > unsigned_integers
This is the list of c++ unsigned integer types.
Template classes for lists of types.
unsigned_integer_of_size< 16 >::type u_int_16
An unsigned integer on 16 bits.
integer_of_size< 32 >::type int_32
An integer on 32 bits.
find_type_by_size< Size, unsigned_integers >::type type
The integer type that matches the given size.
integer_of_size< 16 >::type int_16
An integer on 16 bits.
integer_of_size< 8 >::type int_8
An integer on 8 bits.
This is the main namespace.