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++
Why can't PODs have constructors?
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="James Kanze, post: 2993186"] I know what you mean. From a language point of view, it may always be a constructor, but from a logical point of view, I, too, tend to think of creating a new object as somehow different from creating a copy. I even have a few special cases where I keep count of the copies, and the "real" destruction---something like freeing the resource in RAII---only takes place when the last copy is destructed. (Boost::shared_ptr is a special case of this particular idiom.) More likely, either everything from column B, or nothing:-). Quite. If you have a user defined copy-constructor (which inhibits the automatic generation of a default constructor), you'd better have at least one other user defined constructor as well. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Why can't PODs have constructors?
Top