We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 162b51c commit e50563cCopy full SHA for e50563c
inst/include/cpp11/R.hpp
@@ -29,6 +29,7 @@
29
// clang-format on
30
31
#include "cpp11/altrep.hpp"
32
+#include <type_traits>
33
34
namespace cpp11 {
35
namespace literals {
@@ -48,13 +49,13 @@ template <typename T>
48
49
inline T na();
50
51
template <typename T>
-inline bool is_na(T value) {
52
+inline typename std::enable_if<!std::is_same<T, double>::value, bool>::type is_na(T value) {
53
return value == na<T>();
54
}
55
-template <>
56
-inline bool is_na<>(double x) {
57
- return ISNA(x);
+template <typename T>
+inline typename std::enable_if<std::is_same<T, double>::value, bool>::type is_na(T value) {
58
+ return ISNA(value);
59
60
61
} // namespace cpp11
0 commit comments