Skip to content

Commit 53516d2

Browse files
author
Qiang Kou
committed
update Rcpp traits
1 parent 5b599a0 commit 53516d2

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

inst/include/Rcpp/traits/is_arithmetic.h

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,60 @@ namespace traits{
2929
template<typename>
3030
struct is_arithmetic : public false_type { };
3131

32+
template<>
33+
struct is_arithmetic<bool> : public true_type { };
34+
35+
template<>
36+
struct is_arithmetic<const bool> : public true_type { };
37+
38+
template<>
39+
struct is_arithmetic<char> : public true_type { };
40+
41+
template<>
42+
struct is_arithmetic<const char> : public true_type { };
43+
44+
template<>
45+
struct is_arithmetic<signed char> : public true_type { };
46+
47+
template<>
48+
struct is_arithmetic<const signed char> : public true_type { };
49+
50+
template<>
51+
struct is_arithmetic<unsigned char> : public true_type { };
52+
53+
template<>
54+
struct is_arithmetic<const unsigned char> : public true_type { };
55+
56+
template<>
57+
struct is_arithmetic<wchar_t> : public true_type { };
58+
59+
template<>
60+
struct is_arithmetic<const wchar_t> : public true_type { };
61+
62+
template<>
63+
struct is_arithmetic<char16_t> : public true_type { };
64+
65+
template<>
66+
struct is_arithmetic<const char16_t> : public true_type { };
67+
68+
template<>
69+
struct is_arithmetic<char32_t> : public true_type { };
70+
71+
template<>
72+
struct is_arithmetic<const char32_t> : public true_type { };
73+
74+
template<>
75+
struct is_arithmetic<short> : public true_type { };
76+
77+
template<>
78+
struct is_arithmetic<const short> : public true_type { };
79+
80+
template<>
81+
struct is_arithmetic<unsigned short> : public true_type { };
82+
83+
template<>
84+
struct is_arithmetic<const unsigned short> : public true_type { };
85+
3286
template<>
3387
struct is_arithmetic<int> : public true_type { };
3488

0 commit comments

Comments
 (0)