Skip to main content
10 events
when toggle format what by license comment
May 11, 2016 at 16:25 history edited Destructor CC BY-SA 3.0
added 86 characters in body
May 11, 2016 at 16:24 comment added Destructor Ok, thank you sir for taking your time for this wonderful in depth explanation !!!
May 11, 2016 at 15:27 comment added AnT stands with Russia The concept of "initialization" and the role of "constructors" has been around for a long time. The intent is clear and the corresponding wording is clear as well. There are no bugs there. And even if there are bugs in the wording, the intent is, again, perfectly clear. The intent is not being debated. You want to challenge this intent - you can submit a proposal to the committee. But at this moment in C++ only class types can have constructors.
May 11, 2016 at 15:26 comment added AnT stands with Russia @Destructor: Of course, it does. However, the standard defines the language. Everything the standard says is The Absolute Truth by definition. The only "bugs" it can possibly have are mostly wording-related things like self-contradictory wording, ambiguous wording, under-specified and so forth. Such bugs are vehemently sought out, reported, documented, discussed and resolved. "Bugs" in the intent can also exist, but they are a matter of debate.
May 11, 2016 at 14:54 comment added Destructor So, you think that standard is bug free? C++ standard has also bugs.
May 11, 2016 at 14:52 comment added AnT stands with Russia And please don't tell us trollish fairy tales about "asked this question to bjarne via mail". This issue is, again, well-known and has been exhaustively discussed and closed a long time ago. (But even if he said something like that to you, it wouldn't matter anyway.) In the end, the only thing that matters is what the language specification says. What Bjarne Stroustrup says is irrelevant. The post on geeksforgeeks you linked is completely bogus.
May 11, 2016 at 14:43 comment added AnT stands with Russia @Destructor: My answer is absolutely correct. Bjarne Stroustrup deliberately and explicitly lied in his book for the sake of simplifying it. Compare the size of the TC++PL book and the size of C++ language standard. See the difference? The price to pay for relative compactness of TC++PL is such obvious (and well-known to everyone) errors and omissions as the one you mentioned (there are quite a few others as well). So, to put it more succinctly: my answer is right, TC++PL is wrong. But for a person like you, who is just beginning to learn, TC++PL is good enough.
May 11, 2016 at 4:54 comment added Destructor But bjarne stroustrup in his book TC++PL & The C++ Programming language says that "Built-in types also have default constructors" . geeksforgeeks.org/c-default-constructor-built-in-types & informit.com/guides/content.aspx?g=cplusplus&seqNum=15 also says built in types have constructors. I personally asked this question to bjarne via mail & he says me that yes, built in types also have constructors. so your answer is wrong !!!
Nov 11, 2009 at 19:46 history edited AnT stands with Russia CC BY-SA 2.5
edited body; added 15 characters in body; added 2 characters in body
Nov 11, 2009 at 0:06 history answered AnT stands with Russia CC BY-SA 2.5