Click here to Skip to main content
14,391,954 members

ATL / WTL / STL

 
GeneralRe: Changing Title of an SDI appliction Pin
puneit4u14-Aug-13 20:40
Memberpuneit4u14-Aug-13 20:40 
GeneralRe: Changing Title of an SDI appliction Pin
Richard MacCutchan14-Aug-13 21:40
mveRichard MacCutchan14-Aug-13 21:40 
GeneralRe: Changing Title of an SDI appliction Pin
H.Brydon19-Sep-13 21:41
professionalH.Brydon19-Sep-13 21:41 
Questiontrouble with a safe array of variants Pin
jeffery c9-Aug-13 9:56
Memberjeffery c9-Aug-13 9:56 
QuestionPassing CString Pin
bkelly1322-Jul-13 17:31
Memberbkelly1322-Jul-13 17:31 
AnswerRe: Passing CString Pin
Richard MacCutchan22-Jul-13 21:57
mveRichard MacCutchan22-Jul-13 21:57 
AnswerRe: Passing CString Pin
pasztorpisti23-Jul-13 0:44
professionalpasztorpisti23-Jul-13 0:44 
GeneralRe: Passing CString Pin
bkelly1323-Jul-13 17:15
Memberbkelly1323-Jul-13 17:15 
Am I correct in thinking that "return value optimization" self descriptive rather than having a special meaning?

In the first call B, more of a function style, is written as:

CString B( ){ return internal_string }

While the second, more of a procedure style, would look like:

 void B( CSrting &some_string );<br />
{ some_string.empty();<br />
  some_string = internal_string;<br />
}


That presumes that some_string = internal_string is a copy operation and not a reference operation. Is that presumption true or false?

The first hands out an address within B's space while the second does not. That also means that the caller would have to copy it before doing anything that would change it. I know we can adorn the return value with "const", but still.

Is that logic flawed?
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

GeneralRe: Passing CString Pin
pasztorpisti24-Jul-13 1:43
professionalpasztorpisti24-Jul-13 1:43 
GeneralRe: Passing CString Pin
H.Brydon19-Sep-13 21:58
professionalH.Brydon19-Sep-13 21:58 
AnswerRe: Passing CString Pin
Krishnakumartg13-Aug-13 7:43
MemberKrishnakumartg13-Aug-13 7:43 
AnswerRe: Passing CString Pin
Manoj Kumar Rai21-Aug-13 13:29
professionalManoj Kumar Rai21-Aug-13 13:29 
Questionchang folder's icon Pin
swing001016-Jul-13 1:33
Memberswing001016-Jul-13 1:33 
QuestionCOM technology and use Pin
marisha.u12-Jul-13 10:53
Membermarisha.u12-Jul-13 10:53 
AnswerRe: COM technology and use Pin
Richard MacCutchan12-Jul-13 23:06
mveRichard MacCutchan12-Jul-13 23:06 
AnswerRe: COM technology and use Pin
pasztorpisti13-Jul-13 8:58
professionalpasztorpisti13-Jul-13 8:58 
GeneralRe: COM technology and use Pin
marisha.u15-Jul-13 5:31
Membermarisha.u15-Jul-13 5:31 
GeneralRe: COM technology and use Pin
pasztorpisti15-Jul-13 5:48
professionalpasztorpisti15-Jul-13 5:48 
AnswerRe: COM technology and use Pin
yusif muffed ektilat25-Aug-13 10:19
professionalyusif muffed ektilat25-Aug-13 10:19 
SuggestionHelp : learn ATL, STL and COM Pin
shanmugarajaa8-Jul-13 19:59
Membershanmugarajaa8-Jul-13 19:59 
GeneralRe: Help : learn ATL, STL and COM Pin
Richard MacCutchan8-Jul-13 22:12
mveRichard MacCutchan8-Jul-13 22:12 
GeneralRe: Help : learn ATL, STL and COM Pin
Jonathan Davies8-Jul-13 23:39
MemberJonathan Davies8-Jul-13 23:39 
GeneralRe: Help : learn ATL, STL and COM Pin
Ajay_Tiwari3-Sep-13 1:18
MemberAjay_Tiwari3-Sep-13 1:18 
QuestionHow can I get the ATL Headers for free? Pin
Louai Haimour7-Jul-13 0:37
MemberLouai Haimour7-Jul-13 0:37 
AnswerRe: How can I get the ATL Headers for free? Pin
Richard MacCutchan7-Jul-13 2:23
mveRichard MacCutchan7-Jul-13 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.