git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: use safer lvalue assignment (copy)
5a42964Andy Arvanitis
pcc/include/purescript.cc+1−2
@@ -71,10 +71,9 @@ auto any::operator=(const any& rhs) -> any& {
71 return *this;
71 return *this;
72}
72}
73
73
74−// Takes ownership -- might need to reconsider this
75auto any::operator=(any& rhs) noexcept -> any& {
74auto any::operator=(any& rhs) noexcept -> any& {
76 type = rhs.type;
75 type = rhs.type;
77− MOVE_DATA(rhs);
76+ COPY_DATA(rhs);
78 return *this;
77 return *this;
79}
78}
80
79