summaryrefslogtreecommitdiff
path: root/include/lib/ArduinoJson/Polyfills/type_traits/integral_constant.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/lib/ArduinoJson/Polyfills/type_traits/integral_constant.hpp')
-rw-r--r--include/lib/ArduinoJson/Polyfills/type_traits/integral_constant.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/lib/ArduinoJson/Polyfills/type_traits/integral_constant.hpp b/include/lib/ArduinoJson/Polyfills/type_traits/integral_constant.hpp
new file mode 100644
index 0000000..b53d711
--- /dev/null
+++ b/include/lib/ArduinoJson/Polyfills/type_traits/integral_constant.hpp
@@ -0,0 +1,19 @@
+// ArduinoJson - https://arduinojson.org
+// Copyright Benoit Blanchon 2014-2021
+// MIT License
+
+#pragma once
+
+#include <ArduinoJson/Namespace.hpp>
+
+namespace ARDUINOJSON_NAMESPACE {
+
+template <typename T, T v>
+struct integral_constant {
+ static const T value = v;
+};
+
+typedef integral_constant<bool, true> true_type;
+typedef integral_constant<bool, false> false_type;
+
+} // namespace ARDUINOJSON_NAMESPACE