@@ -12,7 +12,9 @@ namespace helpers {
12
12
typedef struct {char a[2 ];} CTYPE_SHORT;
13
13
typedef struct {char a[3 ];} CTYPE_INT;
14
14
typedef struct {char a[4 ];} CTYPE_LONG;
15
+ #ifdef RCPP_HAS_LONG_LONG_TYPES
15
16
typedef struct {char a[5 ];} CTYPE_LONG_LONG;
17
+ #endif
16
18
typedef struct {char a[6 ];} CTYPE_FLOAT;
17
19
typedef struct {char a[7 ];} CTYPE_DOUBLE;
18
20
typedef struct {char a[8 ];} CTYPE_LONG_DOUBLE;
@@ -21,7 +23,9 @@ namespace helpers {
21
23
typedef struct {char a[11 ];} CTYPE_UNSIGNED_SHORT;
22
24
typedef struct {char a[12 ];} CTYPE_UNSIGNED_INT;
23
25
typedef struct {char a[13 ];} CTYPE_UNSIGNED_LONG;
26
+ #ifdef RCPP_HAS_LONG_LONG_TYPES
24
27
typedef struct {char a[14 ];} CTYPE_UNSIGNED_LONG_LONG;
28
+ #endif
25
29
typedef struct {char a[128 ];} CTYPE_UNKNOWN;
26
30
27
31
template < std::size_t I >
@@ -39,8 +43,10 @@ namespace helpers {
39
43
template <>
40
44
struct ctype_helper < sizeof (CTYPE_LONG) > { typedef long type; static const bool value = true ; };
41
45
46
+ #ifdef RCPP_HAS_LONG_LONG_TYPES
42
47
template <>
43
48
struct ctype_helper < sizeof (CTYPE_LONG_LONG) > { typedef long long type; static const bool value = true ; };
49
+ #endif
44
50
45
51
template <>
46
52
struct ctype_helper < sizeof (CTYPE_FLOAT) > { typedef float type; static const bool value = true ; };
@@ -66,8 +72,10 @@ namespace helpers {
66
72
template <>
67
73
struct ctype_helper < sizeof (CTYPE_UNSIGNED_LONG) > { typedef unsigned long type; static const bool value = true ; };
68
74
75
+ #ifdef RCPP_HAS_LONG_LONG_TYPES
69
76
template <>
70
77
struct ctype_helper < sizeof (CTYPE_UNSIGNED_LONG_LONG) > { typedef unsigned long long type; static const bool value = true ; };
78
+ #endif
71
79
72
80
73
81
template < typename T >
@@ -77,7 +85,9 @@ namespace helpers {
77
85
static CTYPE_SHORT test (const short &);
78
86
static CTYPE_INT test (const int &);
79
87
static CTYPE_LONG test (const long &);
88
+ #ifdef RCPP_HAS_LONG_LONG_TYPES
80
89
static CTYPE_LONG_LONG test (const long long &);
90
+ #endif
81
91
static CTYPE_FLOAT test (const float &);
82
92
static CTYPE_DOUBLE test (const double &);
83
93
static CTYPE_LONG_DOUBLE test (const long double &);
@@ -86,7 +96,9 @@ namespace helpers {
86
96
static CTYPE_UNSIGNED_SHORT test (const unsigned short &);
87
97
static CTYPE_UNSIGNED_INT test (const unsigned int &);
88
98
static CTYPE_UNSIGNED_LONG test (const unsigned long &);
99
+ #ifdef RCPP_HAS_LONG_LONG_TYPES
89
100
static CTYPE_UNSIGNED_LONG_LONG test (const unsigned long long &);
101
+ #endif
90
102
static CTYPE_UNKNOWN test (...);
91
103
92
104
static T make ();
@@ -101,7 +113,9 @@ namespace helpers {
101
113
static CTYPE_SHORT test (const short &);
102
114
static CTYPE_INT test (const int &);
103
115
static CTYPE_LONG test (const long &);
116
+ #ifdef RCPP_HAS_LONG_LONG_TYPES
104
117
static CTYPE_LONG_LONG test (const long long &);
118
+ #endif
105
119
static CTYPE_FLOAT test (const float &);
106
120
static CTYPE_DOUBLE test (const double &);
107
121
static CTYPE_LONG_DOUBLE test (const long double &);
@@ -110,7 +124,9 @@ namespace helpers {
110
124
static CTYPE_UNSIGNED_SHORT test (const unsigned short &);
111
125
static CTYPE_UNSIGNED_INT test (const unsigned int &);
112
126
static CTYPE_UNSIGNED_LONG test (const unsigned long &);
127
+ #ifdef RCPP_HAS_LONG_LONG_TYPES
113
128
static CTYPE_UNSIGNED_LONG_LONG test (const unsigned long long &);
129
+ #endif
114
130
static CTYPE_UNKNOWN test (...);
115
131
116
132
static T make ();
0 commit comments