I think the biggest issue in C++ is that you don't have to understand this whole mess to be productive in it. This is also perhaps its greatest strength. Where you have Rust which won't even compile a basic toy program without demonstrating a full understanding of its Ownership model.
C++ value category cheat-sheet [pdf]
31–40 of 41 posts
Re: C++ value category cheat-sheet [pdf]
#32Re: C++ value category cheat-sheet [pdf]
#33Re: C++ value category cheat-sheet [pdf]
#34Re: C++ value category cheat-sheet [pdf]
#35Re: C++ value category cheat-sheet [pdf]
#36A comment on the document's design: The low contrast of light gray text on yellow background makes it difficult to read. Black text on white, or dark gray text on white is perfectly acceptable. Another drawback of colored backgrounds is that readers wanting to print out the pdf will consume ink/toner to render the non-white background.
Relevant: http://contrastrebellion.com
I'm not a PhD in Colorology but choosing higher contrast colors completely eliminates that problem I think. It's an easy fix that opens up many new markets to your software.
Re: C++ value category cheat-sheet [pdf]
#37Earlier quoted context omitted.
This might answer that https://herbsutter.com/2008/01/01/gotw-88-a-candidate-for-th... I think this is similar to the std::max/std::min stuff
No, that post refers to the lifetime of temporaries held by local reference variables. My question is about temporaries created to pass reference parameters to a function. Is the lifetime of that temporary the BODY of the function? The full expression that calls the function? The enclosing scope of that full expression? (for the record, VS2017 does the latter)
Re: C++ value category cheat-sheet [pdf]
#38Earlier quoted context omitted.
Ok. auto i{42}; // std::initializer_list
No longer applies with c++17
Re: C++ value category cheat-sheet [pdf]
#39Are there cheat sheets like this for other languages too?
Re: C++ value category cheat-sheet [pdf]
#40Softer entry to the whole concept of lvalues/rvalues in general: http://eli.thegreenplace.net/2011/12/15/understanding-lvalue...