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: 2990785"] [...] I seem to remember once seeing an explination by Stroustrup of why he didn't do this. I've forgotten where, and all of the details, but it did seem clear to me that the current situation is the result of a careful and reasoned decision. One may not agree with the decision (I'm not sure I do either), but there's certainly nothing unreasonable about it; it's one of those cases where there are arguments on both sides, and either choice is, in some ways, right. You certainly don't want to ban padding. That would make C++ unacceptably slow on just about every modern machine. And of course, the layout in a struct or a class in C++ has absolutely nothing to do with IO, in any way, shape, form or fashion. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Why can't PODs have constructors?
Top