Midge
v3.9.2
Data Processing Framework
test
test_typelength.cc
Go to the documentation of this file.
1
#include "
typelength.hh
"
2
#include "
typelist.hh
"
3
4
#include <iostream>
5
6
using namespace
midge
;
7
8
using
std::cout;
9
using
std::endl;
10
11
int
main
()
12
{
13
14
typedef
type_list< char, short, int >
list_one;
15
16
cout <<
"length of list_one should be <3> and is <"
<<
type_size< list_one >::value
<<
">"
<< endl;
17
18
typedef
type_list< unsigned char, char, unsigned short, short, unsigned int, int, unsigned long, long, float, double >
list_two;
19
20
cout <<
"length of list_two should be <10> and is <"
<<
type_size< list_two >::value
<<
">"
<< endl;
21
22
return
0;
23
24
}
midge
Definition:
_buffer.hh:11
midge::type_size
type_rename< x_list, type_length > type_size
Calculates the number of types in type list x_list; returns it as type_size::value.
Definition:
typelength.hh:14
midge::type_list
Type list.
Definition:
typelist.hh:7
main
int main()
Definition:
test_typelength.cc:11
typelist.hh
typelength.hh
Generated by
1.8.13