11 ms·
Yes, it's a good idea to know the implicit rules for constructors and assignment operators in C++. No, it's not a bad idea to be as explicit as possible all th
by butterisgood 5y ago
Yes, it's a good idea to know the implicit rules for constructors and assignment operators in C++.
No, it's not a bad idea to be as explicit as possible all the time when writing code, because code is for humans first, and computers second.
I always found =delete to be very nice documentation of what I can expect of a struct, class etc in terms of valid uses.
And C++ is huge - assuming all the people on your team understand all of it, and the corners and implicit behaviors is really not a great idea. So you should remove any potential source of confusion, or ambiguity in a source tree - as much as possible.