mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Added a deprecation warning for as<char*>()
This commit is contained in:
@@ -65,10 +65,17 @@ class ElementProxy : public VariantOperators<ElementProxy<TArray> >,
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
FORCE_INLINE T as() const {
|
||||
FORCE_INLINE typename enable_if<!is_same<T, char*>::value, T>::type as()
|
||||
const {
|
||||
return getUpstreamElement().template as<T>();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
FORCE_INLINE typename enable_if<is_same<T, char*>::value, const char*>::type
|
||||
DEPRECATED("Replace as<char*>() with as<const char*>()") as() const {
|
||||
return as<const char*>();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
FORCE_INLINE operator T() const {
|
||||
return getUpstreamElement();
|
||||
|
||||
Reference in New Issue
Block a user