This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH] setup.exe SEGV on WinXP/Pro
- From: Achim Gratz <Stromeko at nexgo dot de>
- To: cygwin-apps at cygwin dot com
- Date: Fri, 09 Aug 2013 23:04:54 +0200
- Subject: Re: [PATCH] setup.exe SEGV on WinXP/Pro
- References: <877gfw2fqp dot fsf at Rainer dot invalid> <20130809090726 dot GS16868 at calimero dot vinschen dot de> <20130809153313 dot GA2312 at ednor dot casa dot cgf dot cx> <786EBDA1AC46254B813E200779E7AD3602FF22B6 at srv1163ex1 dot flightsafety dot com> <20130809165513 dot GA7420 at ednor dot casa dot cgf dot cx> <20130809174723 dot GA4276 at calimero dot vinschen dot de>
Corinna Vinschen writes:
> Not quite. ostringstream::str returns string, the string constructor
> implicitely returns string&.
I could be reading it wrong, but I don't think that's what the C++11
standard says should happen. The implicit copy constructor transfering
the return value out of the function will treat the argument of the
return as an rvalue reference (but it'd do that just the same for
ostringstream::str, since that's simply how it is declared.
> It's sometimes tricky to wrap the brain
> around the differences as far as the scope is concerned.
It is true that the temporary object created by the explicit constructor
in the return statement is destroyed at the end of full-expression of
the return (12.2, 12.4). But, the return statement itself has
initialization semantics, which means it operates as if a copy
constructor was invoked between the argument of the return and the
actual return value of the function (which in this case is a conversion
function, but I didn't find any hints in the standard that this would
somehow change semantics).
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Samples for the Waldorf Blofeld: