Skip to content

Commit

Permalink
Merge pull request #719 from yachoor/remove_broken_assignment
Browse files Browse the repository at this point in the history
Remove non-compiling assignment operator
  • Loading branch information
miloyip committed Aug 29, 2016
2 parents f54b0e4 + 862c39b commit 9bd618f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/rapidjson/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ struct GenericStringRef {

GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}

GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }

//! implicit conversion to plain CharType pointer
operator const Ch *() const { return s; }

Expand All @@ -328,6 +326,8 @@ struct GenericStringRef {
//! Disallow construction from non-const array
template<SizeType N>
GenericStringRef(CharType (&str)[N]) /* = delete */;
//! Copy assignment operator not permitted - immutable type
GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */;
};

//! Mark a character pointer as constant string
Expand Down

0 comments on commit 9bd618f

Please sign in to comment.