logoalt Hacker News

eskayesterday at 7:24 PM1 replyview on HN

Correct. But the C++ language is not a language in which one should just say “screw it” and overload the assignment operator of all things while breaking its contract. Stuff like this is why many purists argue that operator overloading shouldn’t be a thing, because it can lead to shenanigans like this.


Replies

tardedmemeyesterday at 9:24 PM

On the contrary, C++ lets you try such things, discover that they don't work well, and then undo them.