forked from bblanchon/ArduinoJson
Make string support even more generic
Ported from 57354de831
Closes #2084
This commit is contained in:
committed by
Benoit Blanchon
parent
ece4d030a8
commit
82de20ee14
@ -3,6 +3,7 @@ ArduinoJson: change log
|
|||||||
|
|
||||||
* Add `ARDUINOJSON_STRING_LENGTH_SIZE` to the namespace name
|
* Add `ARDUINOJSON_STRING_LENGTH_SIZE` to the namespace name
|
||||||
* Add MsgPack bin8/bin16/bin32 support (PR #2078 by @Sanae6)
|
* Add MsgPack bin8/bin16/bin32 support (PR #2078 by @Sanae6)
|
||||||
|
* Make string support even more generic (PR #2084 by @d-a-v)
|
||||||
|
|
||||||
v7.0.4 (2024-03-12)
|
v7.0.4 (2024-03-12)
|
||||||
------
|
------
|
||||||
|
@ -38,16 +38,15 @@ struct has_data<T,
|
|||||||
const char*>::value>::type>
|
const char*>::value>::type>
|
||||||
: true_type {};
|
: true_type {};
|
||||||
|
|
||||||
// size_t length() const
|
// unsigned int length() const
|
||||||
// - String
|
// - String
|
||||||
|
|
||||||
template <class T, class = void>
|
template <class T, class = void>
|
||||||
struct has_length : false_type {};
|
struct has_length : false_type {};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct has_length<
|
struct has_length<T, typename enable_if<is_unsigned<
|
||||||
T, typename enable_if<
|
decltype(declval<const T>().length())>::value>::type>
|
||||||
is_same<decltype(declval<const T>().length()), size_t>::value>::type>
|
|
||||||
: true_type {};
|
: true_type {};
|
||||||
|
|
||||||
// size_t size() const
|
// size_t size() const
|
||||||
|
Reference in New Issue
Block a user