forked from bblanchon/ArduinoJson
1 parent
20219d74f0
commit
0dd6231b3f
5 files changed
+28
-9
No files matched your search
@@ -24,14 +24,10 @@ struct first_or_void<T, Rest...> {
|
||||
|
||||
// A meta-function that returns true if T is a valid destination type for
|
||||
// deserialize()
|
||||
template <class T, class = void>
|
||||
struct is_deserialize_destination : false_type {};
|
||||
|
||||
template <class T>
|
||||
struct is_deserialize_destination<
|
||||
T, enable_if_t<is_same<decltype(VariantAttorney::getResourceManager(
|
||||
detail::declval<T&>())),
|
||||
ResourceManager*>::value>> : true_type {};
|
||||
using is_deserialize_destination =
|
||||
bool_constant<is_base_of<JsonDocument, remove_cv_t<T>>::value ||
|
||||
IsVariant<T>::value>;
|
||||
|
||||
template <typename TDestination>
|
||||
inline void shrinkJsonDocument(TDestination&) {
|
||||
|
||||
@@ -13,7 +13,10 @@ struct integral_constant {
|
||||
static const T value = v;
|
||||
};
|
||||
|
||||
typedef integral_constant<bool, true> true_type;
|
||||
typedef integral_constant<bool, false> false_type;
|
||||
template <bool B>
|
||||
using bool_constant = integral_constant<bool, B>;
|
||||
|
||||
using true_type = bool_constant<true>;
|
||||
using false_type = bool_constant<false>;
|
||||
|
||||
ARDUINOJSON_END_PRIVATE_NAMESPACE
|
||||
Reference in new issue
Block a user