Rcpp Version 1.1.2
Loading...
Searching...
No Matches
is_arithmetic.h
Go to the documentation of this file.
1// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
2/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
3//
4// is_wide_string.h: Rcpp R/C++ interface class library -- traits to help wrap
5//
6// Copyright (C) 2013 - 2025 Dirk Eddelbuettel and Romain Francois
7//
8// This file is part of Rcpp.
9//
10// Rcpp is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 2 of the License, or
13// (at your option) any later version.
14//
15// Rcpp is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
22
23#ifndef Rcpp__traits__is_arithmetic__h
24#define Rcpp__traits__is_arithmetic__h
25
26namespace Rcpp{
27namespace traits{
28
29 template<typename>
30 struct is_arithmetic : public false_type { };
31
32 template<>
33 struct is_arithmetic<short> : public true_type { };
34
35 template<>
36 struct is_arithmetic<const short> : public true_type { };
37
38 template<>
39 struct is_arithmetic<unsigned short> : public true_type { };
40
41 template<>
42 struct is_arithmetic<const unsigned short> : public true_type { };
43
44 template<>
45 struct is_arithmetic<int> : public true_type { };
46
47 template<>
48 struct is_arithmetic<const int> : public true_type { };
49
50 template<>
51 struct is_arithmetic<unsigned int> : public true_type { };
52
53 template<>
54 struct is_arithmetic<const unsigned int> : public true_type { };
55
56 template<>
57 struct is_arithmetic<long> : public true_type { };
58
59 template<>
60 struct is_arithmetic<const long> : public true_type { };
61
62 template<>
63 struct is_arithmetic<unsigned long> : public true_type { };
64
65 template<>
66 struct is_arithmetic<const unsigned long> : public true_type { };
67
68 template<>
70
71 template<>
72 struct is_arithmetic<const rcpp_long_long_type> : public true_type { };
73
74 template<>
76
77 template<>
78 struct is_arithmetic<const rcpp_ulong_long_type> : public true_type { };
79
80 template<>
81 struct is_arithmetic<float> : public true_type { };
82
83 template<>
84 struct is_arithmetic<const float> : public true_type { };
85
86 template<>
87 struct is_arithmetic<double> : public true_type { };
88
89 template<>
90 struct is_arithmetic<const double> : public true_type { };
91
92 template<>
93 struct is_arithmetic<long double> : public true_type { };
94
95 template<>
96 struct is_arithmetic<const long double> : public true_type { };
97
98} // traits
99} // Rcpp
100
101#endif
long long int rcpp_long_long_type
Definition longlong.h:26
unsigned long long int rcpp_ulong_long_type
Definition longlong.h:27
traits used to dispatch wrap
Definition Date.h:27
integral_constant< bool, true > true_type
integral_constant< bool, false > false_type
Rcpp API.
Definition algo.h:28