We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5674760 commit 3b26fb2Copy full SHA for 3b26fb2
1 file changed
include/cpp-json/value.tcc
@@ -156,7 +156,9 @@ inline value::value(const value &other) : type_(other.type_) {
156
// Name: operator=
157
//------------------------------------------------------------------------------
158
inline value &value::operator=(const value &rhs) {
159
- value(rhs).swap(*this);
+ if(this != &rhs) {
160
+ value(rhs).swap(*this);
161
+ }
162
return *this;
163
}
164
0 commit comments