This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25950] [3.4/4.0/4.1] [DR 391] Reference binding and explicit copy constructors
- From: "gdr at cs dot tamu dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jan 2006 03:40:56 -0000
- Subject: [Bug c++/25950] [3.4/4.0/4.1] [DR 391] Reference binding and explicit copy constructors
- References: <bug-25950-11686@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from gdr at cs dot tamu dot edu 2006-01-25 03:40 -------
Subject: Re: [3.4/4.0/4.1] [DR 392] Reference binding and explicit copy
constructors
"hhinnant at apple dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| (In reply to comment #11)
| > | Did you read comment 3?
| >
| > Yes. Is your claim that whether the copy constructor is converting or
| > not does not matter?
|
| No. My suspicion is that there is a 99.99% chance that EDG is conforming to
| C++03 in this regard.
Further investigation reveals this: If an implementation chooses the
second bullet (where it elects to copy the temporary to another
temporary) what is the semantics? Is it copy-initialization as
everywhere else in argument pass-by-value? Or is it
direct-initialization? That is what my question meant. GCC always
uses copy-initialization in function argument passing, except when the
parameter directly binds, i.e. no temporary is needed.
| And furthermore, their behavior (which is different from
| ours) is preferable to our customers.
I think I know where this PR comes from (move semantics simulation
anyone? :-). My main objection is classifying it as regression. The
issue would deserve a DR if we did not already have 391.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25950