Back to Basics: Understanding Value Categories - Ben Saks - CppCon 2019

  Рет қаралды 35,718

CppCon

CppCon

Күн бұрын

CppCon.org
Discussion & Comments: / cpp
Presentation Materials: github.com/CppCon/CppCon2019
-
Back to Basics: Understanding Value Categories
You may be familiar with the terms lvalue, rvalue, and xvalue, if only because they occasionally appear in compiler error messages. However, if you have only a vague understanding of what they mean, you're not alone. Lvalues, rvalues, and xvalues aren't actually language features, but rather semantic properties of expressions and sub-expressions. Understanding these properties provides valuable insights into the behavior of built-in operators, the code generated to execute those operators, and the meaning of some otherwise cryptic compiler error messages. Understanding these properties is also essential for working effectively with lvalue and rvalue reference types, as well as overloaded operators.
This session explains why the language distinguishes among lvalues, rvalues, and xvalues. It describes how the semantic properties of lvalues, rvalues, and xvalues are different and how those properties are reflected in the behavior of lvalue and rvalue references.
-
Ben Saks
-
Videos Filmed & Edited by Bash Films: www.BashFilms.com
*-----*
Register Now For CppCon 2022: cppcon.org/registration/
*-----*

Пікірлер: 51
@lsmgeb89
@lsmgeb89 3 жыл бұрын
After I have been reading some other materials about value categories, this lecture really helps me to understand them. Ben explained these concepts in a crystal clear way. Every modern C++ books should have this chapter.
@me5ng3
@me5ng3 Жыл бұрын
What materials were you reading about value categories? I'd love to read more on the subject
@pmcgee003
@pmcgee003 4 жыл бұрын
TFW your Basics lecture includes the term Temporary Materialisation Conversion.
@Possseidon
@Possseidon 4 жыл бұрын
Ahhh! I knew what lvalue and rvalue where, but never got my head around glvalue, prvalues and xvalues. Now I finally got it! Absolutely great talk!
@gustafbstrom
@gustafbstrom 8 ай бұрын
This talk made how to think about C++ value catogories so much more clear to me. Thanks sir!
@orlandoboffill7448
@orlandoboffill7448 4 жыл бұрын
Mr Ben Saks is a gifted teacher!
@mikkqu
@mikkqu 4 жыл бұрын
This guy is awesome, I hope to see more of him in the future!
@YourCRTube
@YourCRTube 4 жыл бұрын
Great talk. Both approachable and exhaustive.
@kamilziemian995
@kamilziemian995 Жыл бұрын
Saks family is an family of experts in explaining C++ in a clear way.
@DominoPivot
@DominoPivot 2 жыл бұрын
I've been working on highly abstract languages for years so that was an excellent refresher.
@saeedmahmoodi7211
@saeedmahmoodi7211 4 жыл бұрын
after 2 months of consusions i finally got it Geart job!
@RyutlisWang
@RyutlisWang Жыл бұрын
Thank you Ben for such clear and thorough explanation of value categories, the best I have seen.
@collapsingspace
@collapsingspace 3 жыл бұрын
<a href="#" class="seekto" data-time="2894">48:14</a> For people wondering if std::move(T &&a) has rvalue reference to T as parameter how does it work with something like std::move(str) because str is here an lvalue and it's clearly told in the talk that references to rvalue types only bind to rvalues and not lvalues.. There's a deeper concept at play here note that std::move is templatized and the T&& a parameter actually becomes T&a when called like std::move(str)... you can find videos on type deduction on youtube.
@toolmanp3885
@toolmanp3885 10 ай бұрын
This lecture is truly insightful and easy to follow after I tries to study the value categories in cpp references. Huge thanks!
@kamilziemian995
@kamilziemian995 Жыл бұрын
Every C++ programmer should watch this video. With exception to Ben Saks and other superprogrammers that already know it content. 😉
@jiaweihe1244
@jiaweihe1244 Жыл бұрын
I cannot find the slides file in the github link provided, is there any other place to get the slides?
@TernaryHound
@TernaryHound 5 ай бұрын
Great lecture. I have used these types and move semantics for years and yet this gave me such a more comfortable understanding of the motivations behind these concepts. Well done!
@ra1n_
@ra1n_ Жыл бұрын
1 hour just flew by Whatta teacher !
@SirToxe
@SirToxe 3 жыл бұрын
Excellent talk by Ben.
@JasonMelton1
@JasonMelton1 2 жыл бұрын
Very helpful in untangling these concepts!
@bboysil
@bboysil 2 жыл бұрын
Perfect introduction to value categories.
@tourdesource
@tourdesource Жыл бұрын
Clear as water now, thank you Ben!
@dickpiano1802
@dickpiano1802 Жыл бұрын
When people, who want to make things more complex, so others will be in awe get together you get the C++ universe.
@zehaia
@zehaia Жыл бұрын
Best explanation of this subject out there.
@RahulRahul-pi5fm
@RahulRahul-pi5fm 9 ай бұрын
Thank you Ben for the presentation.
@marketqueue8562
@marketqueue8562 4 жыл бұрын
Thanks.... Cleared all my confusion...
@kamilziemian995
@kamilziemian995 Жыл бұрын
I should watch all Ben Saks talks avaliable online.
@guykeren9666
@guykeren9666 11 ай бұрын
Gifted! great talk, Helps to understand the basics (how much I didn't know)
@anatheistsopinion9974
@anatheistsopinion9974 3 жыл бұрын
Beyond excellent!
@qasimijaz1664
@qasimijaz1664 9 ай бұрын
what a great talk, thanks Ben
@pawanadhikari110
@pawanadhikari110 4 жыл бұрын
The presentation content isn't available in the github .
@unclechaelsneckvein
@unclechaelsneckvein 7 ай бұрын
Exceptionally good presentation.
@konradkomisarczyk396
@konradkomisarczyk396 2 жыл бұрын
Loved the talk
@manuvaad
@manuvaad Жыл бұрын
Great talk!
@aftostok6080
@aftostok6080 8 ай бұрын
This is great.
@Skotopes666
@Skotopes666 11 ай бұрын
Great talk. Very helpful
@paulozhang9346
@paulozhang9346 2 жыл бұрын
Amazing, thanks man.
@CppCon
@CppCon 2 жыл бұрын
Glad you liked it!
@hanzheng173
@hanzheng173 4 жыл бұрын
very helpful, thanks.
@janpapaj4373
@janpapaj4373 Жыл бұрын
Superb lecture!
@CppCon
@CppCon Жыл бұрын
Glad it was helpful!
@Sabinagirl164
@Sabinagirl164 4 жыл бұрын
Great talk
@shoulderstack5527
@shoulderstack5527 10 ай бұрын
I didn't know std::thread had the ++ operator. If C++ didn't exist, and someone said they had a great idea for a language, and described C++ as it is today, no one would take it seriously. This is no criticism of the speaker, who has done a great job.
@NonTwinBrothers
@NonTwinBrothers 5 ай бұрын
<a href="#" class="seekto" data-time="2925">48:45</a> Alright I'll admit. Intentional or not, that one made me laugh
@syedimadhaqqi4340
@syedimadhaqqi4340 7 ай бұрын
I cannot find the presentation material. Can you please advise a direct link. Thanks
@nguyendaison27
@nguyendaison27 2 жыл бұрын
Thank you.
@CppCon
@CppCon 2 жыл бұрын
You're welcome!
@liveonphoenix5045
@liveonphoenix5045 2 жыл бұрын
@<a href="#" class="seekto" data-time="2588">43:08</a>, I don't understand the 'move' assignment overloaded operator that accepts 'rval' or 'temp-val', it is said that it will delete both previous 'lval' that became 'rval' or 'temp-val', whereupon both 's2' and 's3' become 'nullptr'? By moving, do they also mean emptying those two objects?
@liveonphoenix5045
@liveonphoenix5045 2 жыл бұрын
Oh, I see, only use move semantic if we know the `src` is no longer required. As a reminder, never miss an excellent talk/seminar/lecture, Keep watching until the end.
@abdelrhmanahmed1378
@abdelrhmanahmed1378 3 жыл бұрын
int x = 6; int z = 10; int& p =x; p = 100; cout
@D0Samp
@D0Samp 2 жыл бұрын
Because the target of a reference is defined at assignment and does not change afterwards. "p = z" does not change the reference from x to z, it just assigns the value of z similar to "p = 100". The pointer equivalent looks like this: int * const p = &x; *p = 100; *p = z; // "p = &z" does not work, since the pointer address is const *p = 200;
3 wheeler new bike fitting
00:19
Ruhul Shorts
Рет қаралды 50 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 33 МЛН
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 11 МЛН
Core C++ 2019 :: Dan Saks :: Understanding Lvalues and Rvalues
1:01:11
Why i think C++ is better than rust
32:48
ThePrimeTime
Рет қаралды 275 М.
Rust Functions Are Weird (But Be Glad)
19:52
Logan Smith
Рет қаралды 128 М.
Back to Basics: Const as a Promise -  Dan Saks - CppCon 2019
1:01:34
CppCon 2019: Jason Turner “The Best Parts of C++"
58:36
CppCon
Рет қаралды 90 М.
Back to Basics:  RAII in C++ - Andre Kostur - CppCon 2022
44:17
The Tragedy of systemd
47:18
linux.conf.au
Рет қаралды 1,1 МЛН
"Understanding value categories in C++" by Kris van Rens
1:28:40
C/C++ Dublin User Group
Рет қаралды 5 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 1,9 МЛН
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,1 МЛН
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 4,1 МЛН