forked from bblanchon/ArduinoJson
Remove ARDUINOJSON_HAS_RVALUE_REFERENCES (#1820)
This commit is contained in:
@@ -4,12 +4,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define ARDUINOJSON_HAS_RVALUE_REFERENCES 1
|
||||
#else
|
||||
# define ARDUINOJSON_HAS_RVALUE_REFERENCES 0
|
||||
#endif
|
||||
|
||||
#ifndef ARDUINOJSON_HAS_NULLPTR
|
||||
# if __cplusplus >= 201103L
|
||||
# define ARDUINOJSON_HAS_NULLPTR 1
|
||||
|
||||
@@ -52,11 +52,9 @@ class BasicJsonDocument : AllocatorOwner<TAllocator>, public JsonDocument {
|
||||
}
|
||||
|
||||
// Move-constructor
|
||||
#if ARDUINOJSON_HAS_RVALUE_REFERENCES
|
||||
BasicJsonDocument(BasicJsonDocument&& src) : AllocatorOwner<TAllocator>(src) {
|
||||
moveAssignFrom(src);
|
||||
}
|
||||
#endif
|
||||
|
||||
BasicJsonDocument(const JsonDocument& src) {
|
||||
copyAssignFrom(src);
|
||||
@@ -90,12 +88,10 @@ class BasicJsonDocument : AllocatorOwner<TAllocator>, public JsonDocument {
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if ARDUINOJSON_HAS_RVALUE_REFERENCES
|
||||
BasicJsonDocument& operator=(BasicJsonDocument&& src) {
|
||||
moveAssignFrom(src);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
BasicJsonDocument& operator=(const T& src) {
|
||||
|
||||
Reference in New Issue
Block a user