summaryrefslogtreecommitdiff
path: root/include/lib/ArduinoJson/TypeTraits/IsFloatingPoint.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/lib/ArduinoJson/TypeTraits/IsFloatingPoint.hpp')
-rw-r--r--include/lib/ArduinoJson/TypeTraits/IsFloatingPoint.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/lib/ArduinoJson/TypeTraits/IsFloatingPoint.hpp b/include/lib/ArduinoJson/TypeTraits/IsFloatingPoint.hpp
new file mode 100644
index 0000000..e41a682
--- /dev/null
+++ b/include/lib/ArduinoJson/TypeTraits/IsFloatingPoint.hpp
@@ -0,0 +1,18 @@
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
+// MIT License
+
+#pragma once
+
+#include "IsSame.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A meta-function that returns true if T is a floating point type
+template <typename T>
+struct IsFloatingPoint {
+ static const bool value = IsSame<T, float>::value || IsSame<T, double>::value;
+};
+}
+}