
David Abrahams wrote:
"Rani Sharoni" <rani_sharoni@hotmail.com> writes:
When source and destinations un-cv types are the same or base/derived direct initialization and copy initialization are the same (per 8.5/14/4/2) and this fact was (viciously) exploited by the old auto_ptr.
Something's missing from that sentence to make it comprehensible.
It has the same grammatical structure as "When my hand is blue or my hair is green and I was a fool", which is not a complete sentence.
I'm not sure that I understand your intention.
I'm trying to say that I don't understand what you're saying in that "sentence", and I'm trying to explain why I don't understand it. The "sentence" is grammatically incomplete. I'd like you to explain what you're trying to say.
For some reason I thought that what I wrote is so trivial that even grammar errors will not hide my intentions. It seems that Christoph Ludwig understand my intentions. Direct initialization is the *same* as copy initialization when constructing object of the same type using non-explicit (i.e. converting) constructor. struct A { A(int); }; A a1(A(10)); // #1 A a2 = A(20); // #2 same as #1 Both initializations are the same per 8.5/14/4/2: <Q> If the initialization is direct-initialization, or if it is copy-initialization where the cv-unqualified version of the source type is the same class as, or a derived class of, the class of the destination, constructors are considered. The applicable constructors are enumerated (13.3.1.3), and the best one is chosen through overload resolution (13.3). </Q> IMO your suggestion is fully compliant and EDG has bug that confuses everyone. I don't have anything else to add to this discussion. Thanks, Rani No alarms and not surprises silence.