Minh Nguyen / ArduinoJson
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers is_enum.hpp Source File

is_enum.hpp

00001 // ArduinoJson - arduinojson.org
00002 // Copyright Benoit Blanchon 2014-2021
00003 // MIT License
00004 
00005 #pragma once
00006 
00007 #include "is_class.hpp"
00008 #include "is_convertible.hpp"
00009 #include "is_floating_point.hpp"
00010 #include "is_integral.hpp"
00011 #include "is_same.hpp"
00012 
00013 namespace ARDUINOJSON_NAMESPACE {
00014 
00015 template <typename T>
00016 struct is_enum {
00017   static const bool value = is_convertible<T, int>::value &&
00018                             !is_class<T>::value && !is_integral<T>::value &&
00019                             !is_floating_point<T>::value;
00020 };
00021 
00022 }  // namespace ARDUINOJSON_NAMESPACE