1 #include "StArchInfo.h"
5 cout <<
"Checking aligments . . . " << endl;
7 cout <<
" char=" << StArchInfo::align<char>()
8 <<
" short=" << StArchInfo::align<short>()
9 <<
" int=" << StArchInfo::align<int>()
10 <<
" long=" << StArchInfo::align<long>()
11 <<
" long long=" << StArchInfo::align<long long>()
12 <<
" float=" << StArchInfo::align<float>()
13 <<
" double=" << StArchInfo::align<double>()
44 cout <<
"Checking paddings - the number of the bytes to be added to some type to align the other type properly. . . " << endl;
47 <<
" int to get the char=" << StArchInfo::padding<char>(iProbe) << endl
49 <<
" float to get the short=" << StArchInfo::padding<short>(fProbe) << endl
51 <<
" short to get the int=" << StArchInfo::padding<int>(sProbe) << endl
53 <<
" char to get the long=" << StArchInfo::padding<long>(cProbe[0]) << endl
55 <<
" double to get the long long=" << StArchInfo::padding<long long>(dProbe) << endl
56 <<
" long to get the float=" << StArchInfo::padding<float>(lProbe) << endl
58 <<
" char to get the long=" << StArchInfo::padding<long>(cProbe[0]) << endl
60 <<
" char to get the long=" << StArchInfo::padding<long>(cProbe[1]) << endl
62 <<
" char to get the long=" << StArchInfo::padding<long>(cProbe[2]) << endl
64 <<
" char to get the long=" << StArchInfo::padding<long>(cProbe[3]) << endl
66 <<
" char to get the long=" << StArchInfo::padding<long>(cProbe[4]) << endl
68 <<
" char to get the long=" << StArchInfo::padding<long>(cProbe) << endl
70 <<
" long long to get the double=" << StArchInfo::padding<double>(llProbe) << endl
static int align()
This is an overloaded member function, provided for convenience.
static int padding(const T &offset)
Returns the number of bytes to be added to the offset of the T type to get the C type proper aligned...