This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Right, page 211 of the C++ standard (2003) explains when copy-ctor and dtor are allowed to be optimized away. But the two circumstances are both like this: A is constructed; A is copy-constructed to B; A is destructed Here A is a temporary object in some sense, and the standard allows for directly constructing B. However, Neal expected the compiler to optimize "A is constructed; A is destructed" away. I find nowhere in the standard that allows this.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |