Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Default functions implemented by compiler
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Rolf Magnus, post: 2565806"] I acutally didn't, but I guess it depends on the point of view. The compiler-generated copy constructor will just copy all the members. If a member is a pointer, it won't copy what that pointer points to. However, if you have such a case, you usually need a user-defined constructor to either do a deep or shallow copy. If you don't have pointer members, the compiler-generated one may be sufficent. Then it will copy the whole object content. I guess in the end, it's best to separate the concept of constructors from the concept of deep/shallow copy. One is part of the language, the other is rather a design concept. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Default functions implemented by compiler
Top