VS2013 doesn't allow move ops to be =default

This commit is contained in:
Billy Donahue
2019-01-21 16:42:25 -05:00
committed by Hans Johnson
parent 433107f1d9
commit 00558b38db
2 changed files with 10 additions and 2 deletions

View File

@@ -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();
}