41#ifndef BZ_USE_NUMTRAIT
42 #define BZ_SUMTYPE(X) X
43 #define BZ_DIFFTYPE(X) X
44 #define BZ_FLOATTYPE(X) X
45 #define BZ_SIGNEDTYPE(X) X
48#define BZ_SUMTYPE(X) _bz_typename NumericTypeTraits<X>::T_sumtype
49#define BZ_DIFFTYPE(X) _bz_typename NumericTypeTraits<X>::T_difftype
50#define BZ_FLOATTYPE(X) _bz_typename NumericTypeTraits<X>::T_floattype
51#define BZ_SIGNEDTYPE(X) _bz_typename NumericTypeTraits<X>::T_signedtype
53template<
typename P_numtype>
54class NumericTypeTraits {
64#define BZDECLNUMTRAIT(X,Y,Z,W,U) \
66 class NumericTypeTraits<X> { \
68 typedef Y T_sumtype; \
69 typedef Z T_difftype; \
70 typedef W T_floattype; \
71 typedef U T_signedtype; \
72 enum { hasTrivialCtor = 1 }; \
76 BZDECLNUMTRAIT(
bool,
unsigned,
int,
float,
int);
79BZDECLNUMTRAIT(
char,
int,
int,
float,
char);
80BZDECLNUMTRAIT(
unsigned char,
unsigned,
int,
float,
int);
81BZDECLNUMTRAIT(
short int,
int,
int,
float,
short int);
82BZDECLNUMTRAIT(
short unsigned int,
unsigned int,
int,
float,
int);
83BZDECLNUMTRAIT(
int,
long,
int,
float,
int);
84BZDECLNUMTRAIT(
unsigned int,
unsigned long,
int,
float,
long);
85BZDECLNUMTRAIT(
long,
long,
long,
double,
long);
86BZDECLNUMTRAIT(
unsigned long,
unsigned long,
long,
double,
long);
87BZDECLNUMTRAIT(
float,
double,
float,
float,
float);
88BZDECLNUMTRAIT(
double,
double,
double,
double,
double);
MemoryBlockReference()
Definition memblock.h:367
Definition array-impl.h:66