Class with naive implementation of rule of 5.
Rule of 5 where assignment operators don't duplicate logic with copy and move constructors.
Rule of 5, where both assignment operators were squashed into one.
Tip 95 of #TuesdayCodingTips - Copy & swap idiom
Rule of 5 says that if you need to implement one of the copy/move constructors/assignment operators or a destructor, you shall implement all of them to avoid resource management issues. However, this often […]
[Original post on techhub.social]