mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-18 19:48:44 +02:00
VS2013 doesn't allow move ops to be =default
This commit is contained in:

committed by
Hans Johnson

parent
433107f1d9
commit
00558b38db
@@ -1440,11 +1440,19 @@ bool Value::isObject() const { return type() == objectValue; }
|
||||
Value::Comments::Comments(const Comments& that)
|
||||
: ptr_{cloneUnique(that.ptr_)} {}
|
||||
|
||||
Value::Comments::Comments(Comments&& that)
|
||||
: ptr_{std::move(that.ptr_)} {}
|
||||
|
||||
Value::Comments& Value::Comments::operator=(const Comments& that) {
|
||||
ptr_ = cloneUnique(that.ptr_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Value::Comments& Value::Comments::operator=(Comments&& that) {
|
||||
ptr_ = std::move(that.ptr_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool Value::Comments::has(CommentPlacement slot) const {
|
||||
return ptr_ && !(*ptr_)[slot].empty();
|
||||
}
|
||||
|
Reference in New Issue
Block a user