Minh Nguyen / ArduinoJson
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IsWriteableString.hpp Source File

IsWriteableString.hpp

00001 // ArduinoJson - arduinojson.org
00002 // Copyright Benoit Blanchon 2014-2021
00003 // MIT License
00004 
00005 #pragma once
00006 
00007 #include <ArduinoJson/Configuration.hpp>
00008 #include <ArduinoJson/Polyfills/type_traits.hpp>
00009 
00010 #if ARDUINOJSON_ENABLE_ARDUINO_STRING
00011 #include <Arduino.h>
00012 #endif
00013 
00014 #if ARDUINOJSON_ENABLE_STD_STRING
00015 #include <string>
00016 #endif
00017 
00018 namespace ARDUINOJSON_NAMESPACE {
00019 
00020 template <typename>
00021 struct IsWriteableString : false_type {};
00022 
00023 #if ARDUINOJSON_ENABLE_ARDUINO_STRING
00024 
00025 template <>
00026 struct IsWriteableString< ::String> : true_type {};
00027 
00028 #endif
00029 
00030 #if ARDUINOJSON_ENABLE_STD_STRING
00031 
00032 template <typename TCharTraits, typename TAllocator>
00033 struct IsWriteableString<std::basic_string<char, TCharTraits, TAllocator> >
00034     : true_type {};
00035 
00036 #endif
00037 }  // namespace ARDUINOJSON_NAMESPACE