|
| 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 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 | + |
| 26 | +namespace Rcpp{ |
| 27 | +namespace traits{ |
| 28 | + |
| 29 | + template<typename> |
| 30 | + struct is_arithmetic : public false_type { }; |
| 31 | + |
| 32 | + template<> |
| 33 | + struct is_arithmetic<int> : public true_type { }; |
| 34 | + |
| 35 | + template<> |
| 36 | + struct is_arithmetic<const int> : public true_type { }; |
| 37 | + |
| 38 | + template<> |
| 39 | + struct is_arithmetic<unsigned int> : public true_type { }; |
| 40 | + |
| 41 | + template<> |
| 42 | + struct is_arithmetic<const unsigned int> : public true_type { }; |
| 43 | + |
| 44 | + template<> |
| 45 | + struct is_arithmetic<long> : public true_type { }; |
| 46 | + |
| 47 | + template<> |
| 48 | + struct is_arithmetic<const long> : public true_type { }; |
| 49 | + |
| 50 | + template<> |
| 51 | + struct is_arithmetic<unsigned long> : public true_type { }; |
| 52 | + |
| 53 | + template<> |
| 54 | + struct is_arithmetic<const unsigned long> : public true_type { }; |
| 55 | + |
| 56 | + template<> |
| 57 | + struct is_arithmetic<long long> : public true_type { }; |
| 58 | + |
| 59 | + template<> |
| 60 | + struct is_arithmetic<const long long> : public true_type { }; |
| 61 | + |
| 62 | + template<> |
| 63 | + struct is_arithmetic<unsigned long long> : public true_type { }; |
| 64 | + |
| 65 | + template<> |
| 66 | + struct is_arithmetic<const unsigned long long> : public true_type { }; |
| 67 | + |
| 68 | + template<> |
| 69 | + struct is_arithmetic<float> : public true_type { }; |
| 70 | + |
| 71 | + template<> |
| 72 | + struct is_arithmetic<const float> : public true_type { }; |
| 73 | + |
| 74 | + template<> |
| 75 | + struct is_arithmetic<double> : public true_type { }; |
| 76 | + |
| 77 | + template<> |
| 78 | + struct is_arithmetic<const double> : public true_type { }; |
| 79 | + |
| 80 | + template<> |
| 81 | + struct is_arithmetic<long double> : public true_type { }; |
| 82 | + |
| 83 | + template<> |
| 84 | + struct is_arithmetic<const long double> : public true_type { }; |
| 85 | + |
| 86 | +} // traits |
| 87 | +} // Rcpp |
| 88 | + |
| 89 | +#endif |
0 commit comments