Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
When writing a C++ class, under what circumstances is writing custom copy and move constructors, and destructors necessary or advisable
Asked
Jan 03 '16 at 00:24
Active
Jan 03 '16 at 00:29
Viewed
38 times
0
When is it necessary and / or advisable to implement non-default
copy constructors
move constructors
destructors
c++
constructor
destructor
copy-constructor
move-constructor
edited
Jan 03 '16 at 00:29
unshul
asked Jan 03 '16 at 00:24
unshul
269
3
16
3
http://stackoverflow.com/questions/4172722/what-is-the-rule-of-three
–
PaulMcKenzie
Jan 03 '16 at 00:29
1
almost never. let library types like `vector`, `shared_ptr` and `string` handle that for you. if you **need** to write a resource manager, remember the single responsibility rule.
–
sp2danny
Jan 03 '16 at 00:37
0 Answers
0