mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Remove explicit exclusion of as<char*>() and as<char>() (#1860)
				
					
				
			If you try to call them, you'll now get the same error message as any unsupported type. You could also add a custom converter for `char*` and `char`.
This commit is contained in:
		| @@ -46,11 +46,9 @@ class VariantRefBase : public VariantTag { | ||||
|   // Casts the value to the specified type. | ||||
|   // https://arduinojson.org/v6/api/jsonvariant/as/ | ||||
|   template <typename T> | ||||
|   FORCE_INLINE typename enable_if<!is_same<T, char*>::value && | ||||
|                                       !is_same<T, char>::value && | ||||
|                                       !ConverterNeedsWriteableRef<T>::value, | ||||
|                                   T>::type | ||||
|   as() const { | ||||
|   FORCE_INLINE | ||||
|       typename enable_if<!ConverterNeedsWriteableRef<T>::value, T>::type | ||||
|       as() const { | ||||
|     return Converter<T>::fromJson(getVariantConst()); | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user