Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C Language Tutorial Pin
Richard MacCutchan11-Dec-13 22:07
mveRichard MacCutchan11-Dec-13 22:07 
QuestionHow to get the android nowtime screen-picture from PC by adb ?? Pin
chehongyang11-Dec-13 19:41
chehongyang11-Dec-13 19:41 
AnswerRe: How to get the android nowtime screen-picture from PC by adb ?? Pin
Albert Holguin12-Dec-13 4:16
professionalAlbert Holguin12-Dec-13 4:16 
Questionto show an color filled object on the top of everything Pin
transoft11-Dec-13 8:34
transoft11-Dec-13 8:34 
AnswerRe: to show an color filled object on the top of everything Pin
Chris Losinger11-Dec-13 10:39
professionalChris Losinger11-Dec-13 10:39 
AnswerRe: to show an color filled object on the top of everything Pin
Albert Holguin12-Dec-13 4:19
professionalAlbert Holguin12-Dec-13 4:19 
Questionstd::swap Corruption [Answered] Pin
Skippums11-Dec-13 7:26
Skippums11-Dec-13 7:26 
AnswerRe: std::swap Corruption Pin
Skippums11-Dec-13 8:35
Skippums11-Dec-13 8:35 
Nevermind: I'm an idiot. I didn't realize that rvalue references are returned automatically, and had a function declared similar to the following:
C++
MyClass<double> &&Foo() {
    MyClass<double> result();
    return std::move(result);
}
I simply had to remove the double ampersand from the return type, and my move constructor/assignment operator were correctly called.

The reason that I saw this weird behavior was because the object that I had a reference to was allocated on the stack. Once enough functions were called (overwriting any pre-existing, invalid stuff on the stack), the object I was using was overwritten. Thanks for anyone who looked into this!
Sounds like somebody's got a case of the Mondays

-Jeff

QuestionQuestion About Threads Pin
AmbiguousName11-Dec-13 5:55
AmbiguousName11-Dec-13 5:55 
AnswerRe: Question About Threads Pin
jschell11-Dec-13 9:03
jschell11-Dec-13 9:03 
AnswerRe: Question About Threads Pin
Chris Losinger11-Dec-13 10:37
professionalChris Losinger11-Dec-13 10:37 
GeneralRe: Question About Threads Pin
Richard Andrew x6411-Dec-13 13:56
professionalRichard Andrew x6411-Dec-13 13:56 
AnswerRe: Question About Threads Pin
Albert Holguin12-Dec-13 4:25
professionalAlbert Holguin12-Dec-13 4:25 
QuestionRe: Question About Threads Pin
AmbiguousName12-Dec-13 4:58
AmbiguousName12-Dec-13 4:58 
QuestionAlways write to top of file Pin
Grahamfff11-Dec-13 1:16
Grahamfff11-Dec-13 1:16 
AnswerRe: Always write to top of file Pin
Richard MacCutchan11-Dec-13 1:53
mveRichard MacCutchan11-Dec-13 1:53 
GeneralRe: Always write to top of file Pin
Grahamfff11-Dec-13 2:33
Grahamfff11-Dec-13 2:33 
GeneralRe: Always write to top of file Pin
Richard MacCutchan11-Dec-13 2:38
mveRichard MacCutchan11-Dec-13 2:38 
GeneralRe: Always write to top of file Pin
Grahamfff11-Dec-13 4:04
Grahamfff11-Dec-13 4:04 
GeneralRe: Always write to top of file Pin
Richard MacCutchan11-Dec-13 4:57
mveRichard MacCutchan11-Dec-13 4:57 
GeneralRe: Always write to top of file Pin
enhzflep11-Dec-13 4:58
enhzflep11-Dec-13 4:58 
AnswerRe: Always write to top of file Pin
Eugen Podsypalnikov11-Dec-13 2:26
Eugen Podsypalnikov11-Dec-13 2:26 
QuestionRe: Always write to top of file Pin
David Crow11-Dec-13 5:15
David Crow11-Dec-13 5:15 
AnswerRe: Always write to top of file Pin
Grahamfff11-Dec-13 5:22
Grahamfff11-Dec-13 5:22 
GeneralRe: Always write to top of file Pin
Stefan_Lang15-Dec-13 23:23
Stefan_Lang15-Dec-13 23: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.