lvalues and rvalues in C++

  Рет қаралды 304,242

The Cherno

The Cherno

Күн бұрын

The first 1000 people who click the link in the description will get 2 free months of Skillshare Premium: skl.sh/thechernoproject6
Patreon ► / thecherno
Instagram ► / thecherno
Twitter ► / thecherno
Discord ► thecherno.com/discord
Series Playlist ► thecherno.com/cpp
This video is sponsored by Skillshare.

Пікірлер: 675
@besusbb
@besusbb 4 жыл бұрын
*adds another ampersand* H O L Y C R A P These videos make me feel like an absolute idiot in C++
@adityaverma6120
@adityaverma6120 4 жыл бұрын
Lmao he loved this, SAVAGE xD
@jd_bruce
@jd_bruce 4 жыл бұрын
It also blew my mind when he assigned a value to the result of the function... seems pretty useless though.
@cole-nyc
@cole-nyc 4 жыл бұрын
@@jd_bruce It's actually really useful. every time you do "vector[2] = 4" you're essentially assigning a value to the result of std::vector::operator[]
@TeamSurvivalLP
@TeamSurvivalLP 4 жыл бұрын
My first thought was why should somebody need that, than he said it's useful with std::move etc... mindblown. Would have saved me some trouble with moving smart pointers
@INeedAttentionEXE
@INeedAttentionEXE 4 жыл бұрын
condescend me daddy!
@B4RN154N
@B4RN154N 4 жыл бұрын
The C++ series is definitely my favorite.
@user-rr5bz4zs5u
@user-rr5bz4zs5u 4 жыл бұрын
This is the MOST clear explanation of r- and l- values I've ever heard or read
@ABaumstumpf
@ABaumstumpf 10 ай бұрын
And sadly it is wrong on many points cause he does exactly what he said we should not do: Try to come up with his own definitions for l/r-values. For example assigning to r-values is allowed and normal. So 6:20 and on are by the standard wrong. C++11 defined that L-values have identity, rvalues can be moved from. And an object can fall into both categories - so called xvalue.
@pacocarrion7869
@pacocarrion7869 2 ай бұрын
@@ABaumstumpf but I don't understand L-Values o R-Values. If I have for example: -> double&& rref = std::sqrt(36.0); is the same than: -> double rref=6; So the variable called "&& rref" I can use it as a normal variable. So whats the point with L-Values o R-Values??? at the end both variables are the same.
@TheSenorTuco
@TheSenorTuco 4 жыл бұрын
Everybody: blown mind Cherno: bored so he has to fiddle with paprika
@Tom4ick
@Tom4ick 4 жыл бұрын
Hey Yan, just wanted to say that thanks to you I got a final 95 grade in Systems Programming course in my university (Computer Science BSc). Thanks a lot! I'm 100% sure that you have the best programming series. period. As a side note, no one EVER got me this excited to code and study :)
@adityavikramsinha408
@adityavikramsinha408 Жыл бұрын
congratulations 🥰🥰
@flflflflflfl
@flflflflflfl Жыл бұрын
@@richardlyman2961 yes, you asked on April 27th 2019 at around 12:37 UTC. Why?
@leixun
@leixun 4 жыл бұрын
*My takeaways:* 1. lvalues vs rvalues 4:25 2. Main advantages 11:35 3. lvalues are variables with some kinds of storage backing them, rvalues are temporary values 12:25
@ikemkrueger
@ikemkrueger 2 жыл бұрын
For me lvalues == "Location", rvalues == "tempoRary".
@duality4y
@duality4y Жыл бұрын
@@ikemkrueger what about a global on the right side.
@Timo-Epis
@Timo-Epis 11 ай бұрын
@@ikemkrueger That was the first thing I was thinking when I heard about it aswel !
@cipherxen2
@cipherxen2 4 жыл бұрын
lvalue has two components 1) value 2) address rvalue has only 1) value ----- rvalue is allowed only on right hand side on assignment only lvalue is allowed on left hand side of assignment lvalue is allowed on right hand side of assignment ----- On right hand side of assignment 1. As rvalue only has value, it's value is used 2. As lvalue has both value and address, what gets used depends on left hand side expression On left hand side of assignment 1. Only address part of lvalue is used 2. As rvalue doesn't have address, it cannot be used ----- rvalue reference is just an optimization hack.
@fredoverflow
@fredoverflow 4 жыл бұрын
rvalues of class type DO have and address and CAN appear on the left hand side of assignment: std::string("hello") = "bye";
@cipherxen2
@cipherxen2 4 жыл бұрын
@@fredoverflow ever heard of copy constructor!?
@cipherxen2
@cipherxen2 4 жыл бұрын
@@fredoverflow or operator overloading for that matter?
@fredoverflow
@fredoverflow 4 жыл бұрын
Speaking of operator overloading: If you have two string variables x and y, then the rvalue x+y can also appear on the left hand side of an assignment, i.e. x+y="wat" is perfectly valid (albeit nonsensical) C++.
@cipherxen2
@cipherxen2 4 жыл бұрын
@@fredoverflow it has nothing to do with lvalue or rvalue. It's just syntactic sugar for calling function named "operator=". lvalue/rvalue distinction is applicable for assignments only, and not for overloaded = operator.
@maximorlov8208
@maximorlov8208 4 жыл бұрын
The core explanation starts at 3:55.
@TWiStErRob
@TWiStErRob 4 жыл бұрын
Just wanted to write the same, so much of "the thing I'm going to talk about", so much time wasted.
@II_xD_II
@II_xD_II 4 жыл бұрын
just wanted to type the same
@aishwarya1895
@aishwarya1895 3 жыл бұрын
Thnx😂
@bcuz8998
@bcuz8998 3 жыл бұрын
THANK YOU
@littiliom
@littiliom 3 жыл бұрын
@@TWiStErRob it's only 4 minutes of video lmao. rest of 10 minutes took me like half an hour, i was playing around with code and googled additional stuff. not much time wasted. pretty sure it was painful to read, but yo get the point
@hanscagayan7260
@hanscagayan7260 4 жыл бұрын
I am not a programmer/software developer/coder. I'm not even sure I am referring to the right profession. I got here because I watched the reaction to unreal engine 5 and the ps5 (part 1). The way you explained things in those two videos got me hooked and now I'm watching a video on C++. I am a doctor and a lawyer and C++ is totally alien to me. But I found myself watching this video and "understanding" the main concepts you wanted to get across, which is a testament to how well you can grasp the important lessons and convey them to your audience. Made me want to study programming now (my wife would kill me). I went to a high school in the Philippines and back in 1982, it was one of the first high schools in my country which taught programming. We were taught how to program in "basic". A lot of my classmates became programmers and are now working in the US or have their own software companies. I went down a different path but if I had you as a teacher, who knows, I might now be working on dynamic global illumination and triangles, etc. You should try to fit in a teaching job in between your project development schedules. A lot of programmers/software developers/coders would benefit from your teaching and hopefully, someday come up with something special themselves. You would have the satisfaction of having a hand in shaping the minds of these future superstar developers.You can inspire them.
@leonardodavinci4259
@leonardodavinci4259 Жыл бұрын
Just checking in to see whether you've made a career switch haha
@siddharthchillale
@siddharthchillale Жыл бұрын
You are a doctor AND a lawyer?! AND now you are also learning programming?! Your parents must be damn proud of you.
@iluvyunie
@iluvyunie 4 жыл бұрын
Digging the covid beard Also probably the most helpful channel I've found on youtube in regard to c++. If anyone ever asks me anything about this sort of programming this is straight where they're getting sent.
@dingalong14
@dingalong14 4 жыл бұрын
Woah, what a coincidence, I was just looking for a cohesive explanation of these yesterday! Great video, keep it up!
@saeedmahmoodi7211
@saeedmahmoodi7211 4 жыл бұрын
great job, I was looking for it a long time ago and after 1 month of research I finally got all of my answers, this is really good, I want you to explain it fully so other people can save their time :D Thanks a lot.
@mikefochtman7164
@mikefochtman7164 Жыл бұрын
Been watching C++ series for a while. Great stuff. Just an aside, my compliments to you and your partner (if you have one with you) for the very nice home you have. Seeing various furniture, and now the kitchen, you obviously have good taste and done some wonderful things with your home. (see? Some folks DO notice more than just your skills as a C++ tutor 😉 )
@neoneo1503
@neoneo1503 Жыл бұрын
Great explanation!! Thanks. - int& a; //lvalue reference - const int& a; //support both lvalue and rvalue(by temporary storage) reference - int&& a; //rvalue reference const reference in function for "temporary" rvalue, at 10:05. void Print(const std::string& name)
@chrismakesgames9075
@chrismakesgames9075 4 жыл бұрын
I'm learning C++ and immediately came across this syntax. The two books I have on C++ didn't explain rvalues/lvalues as well as you did with your examples. Thanks!
@bo-dg3bh
@bo-dg3bh 2 жыл бұрын
Chinese is my native language, I read an article in Chinese talking about the same topic and didn't understand. But now it's almost crystal clear to me thanks to this video! How do you remember these things if you're not using them every day? This is one of my biggest headaches about learning cpp
@AdiPrimandaGinting
@AdiPrimandaGinting 2 жыл бұрын
Mandarin is harder than C++, haha
@bo-dg3bh
@bo-dg3bh 2 жыл бұрын
@@AdiPrimandaGinting true that..
@kilinw
@kilinw 2 жыл бұрын
​@@AdiPrimandaGinting Nah mother language is always the easiest. Also chinese is really easy but they just have a nightmare writing system.
@yusinwu
@yusinwu Жыл бұрын
很多中文翻譯的專有名詞,看得很一頭霧水。還不如直接去看原文的code說明教學,比較快理解
@HungryEagle2610
@HungryEagle2610 2 ай бұрын
Yan! You rock! Even though this video was posted 4 years ago it is still relevant and to the point. There is still no resource on the whole internet who can explain it smoothly. Love the videos! You rock!
@shreemoyee_art
@shreemoyee_art 3 жыл бұрын
Awesome video Cherno! Been coding with modern C++ for a few months now, but can FINALLY say I understand rvalues and lvalues! :D
@KarimOsama89
@KarimOsama89 2 жыл бұрын
Clear to-the-point explanation. Your C++ series saves time googling a specific topic. Keep up the good work.
@chrisstone-streetlightinte5629
@chrisstone-streetlightinte5629 4 жыл бұрын
Thanks Cherno! I always wondered what the compiler was referring to in terms of l and r values. Had no idea it was actually a pretty simple concept. As always, thank you!
@levondarbinyan3934
@levondarbinyan3934 4 жыл бұрын
Thank you Cherno, your explanation why we use move semantics is so much better than what I have read from books. You have created a great playlist to understand C++ more.
@pharos640
@pharos640 11 ай бұрын
Every tutorial you make is so informative and so well made. Thank you for making those videos free for all people.
@coen44444
@coen44444 3 жыл бұрын
Extremely well explained, calling lvalues 'location values' entirely cleared up the cloudiness about this subject for me! Amazing job!
@adamshield5029
@adamshield5029 4 жыл бұрын
I use L and R values all the time, have dealt with move semantics, etc. Clicked the link because I knew I always learn something new from you anyway. Did not disappoint. Excellent presentation of this material.
@williamtetlie4274
@williamtetlie4274 4 жыл бұрын
I've been waiting for this! Thank You! :)
@DaveMackinschleavy88
@DaveMackinschleavy88 4 жыл бұрын
Cherno, thank you so much! Your videos are awesome, and I can't wait for move semantics.
@ZiadxKabakibi
@ZiadxKabakibi 4 жыл бұрын
I read a lot of articles and watched many videos about it but no one explained it clear and short like this Thank you very much :D
@007LvB
@007LvB 4 жыл бұрын
Thank you for explaining this concept so well! Looking forward to your video on move semantics!
@Sturmtreiben
@Sturmtreiben 4 жыл бұрын
I know about that topic and advanced C++ concepts like move semantics already, but have to admit you do a pretty good job at explaining stuff like that to beginners. Great work. Hope you explain one day about why passing parameters by value and letting the compiler chose what to do might be good for performance. There’s so much to learn about C++, that’s why I like it.
@shashanksharma21
@shashanksharma21 2 жыл бұрын
Your videos are amazing ! Thank you for taking the time and effort to share your knowledge!
@macewindont9922
@macewindont9922 4 жыл бұрын
Thanks a lot for these C++ videos. They helped me out with a project at work that turned out great. I ported code from Python to C++ and saw a 10x speed improvement!
@nicolascorgier4500
@nicolascorgier4500 Жыл бұрын
Thank you Cherno for all this Amazing content. I've learned so much with your C++ series 👍😎❤️.
@FlareGunDebate
@FlareGunDebate 2 жыл бұрын
This video answered so many questions that had been shelved in the back of my mind. Thank you.
@timetotango9453
@timetotango9453 3 жыл бұрын
I watched the ad of this videoon purpose bc you really deserve it :) thanks a lot for making this clear in my head!
@fr3ddyfr3sh
@fr3ddyfr3sh 2 жыл бұрын
You are seriously the only legit free video series for modern C++ Thanks a lot for partially sharing your knowledge for free!
@jeremymesloh1981
@jeremymesloh1981 4 жыл бұрын
Yan, you are a rock star! I just subscribed to your Patreon btw.. Look forward to all your knowledge about C++ and many other things too. Take care
@alextiga8166
@alextiga8166 4 жыл бұрын
I really hope you won't stop there as this whole topic seems to be quite hard to understand and you make such things appear really simple.
@battosaijenkins946
@battosaijenkins946 4 жыл бұрын
@The Cherno, so then if lets say void setValue(const int& value) accepts both lvalue and rvalue, how come simply saying void setValue(int value) accepts both too?
@alextiga8166
@alextiga8166 4 жыл бұрын
@@battosaijenkins946 by passing by value you make another copy of variable which is lvalue type. The difference is present only when you are using references in order to make your code more effective by avoiding unnecessary copying especially when it comes to large objects.
@MatthijsvanDuin
@MatthijsvanDuin 4 жыл бұрын
@@battosaijenkins946 The parameter (the variable "value" inside setValue()) is initialized from the argument expression. In case of void setValue(int value) that means it will construct a new int, regardless of what type of expression the argument is. If you use some class instead of int then you'll see a constructor of that class will get invoked (which one will depend on what type of expression the argument is). In case of void setValue(int const &value) the caller needs to provide an object (of type int) to which the parameter will bind. This means that if your expression is an "lvalue" (technically a glvalue, any expression that designates an existing object), then no new object will be constructed and "value" will refer to that existing object. If your expression is an "rvalue" (technically a prvalue) then as he explained in the video, a new temporary object will be constructed from this expression and the parameter will bind to that.
@battosaijenkins946
@battosaijenkins946 4 жыл бұрын
@@alextiga8166 So if I do setValue(const int& value) then im not copying at all as oppposed to setValue(int value), is that correct?
@alextiga8166
@alextiga8166 4 жыл бұрын
@@battosaijenkins946 yes, the "value" variable inside the function will be a reference to the variable you passed in this case.
@apenasmeucanal5984
@apenasmeucanal5984 4 жыл бұрын
thanks cherno, i’ve always found this topic to be confusing, but you thankfully made it clearer
@ryanb159
@ryanb159 4 жыл бұрын
This has plagued me for long, and I've been programming in C++ (03) for years. Thank you!
@CacheTaFace2
@CacheTaFace2 4 жыл бұрын
This was the clearest and most concise explanation of this topic that I have seen. Cheers!
@dlofiasco
@dlofiasco 3 жыл бұрын
Man just following along with this makes things so much easier to understand in class. Thanks again Chrono, I also learned that he is an expert grind presser.
@Qualk9000
@Qualk9000 4 жыл бұрын
Thank you so much for your C++ videos! Love them!
@durumbasa
@durumbasa 4 жыл бұрын
Thanks Cherno, top quality content as always
@GreenFlame16
@GreenFlame16 3 жыл бұрын
Can't find the right words of praise for you. My deepest gratitude and appreciation!
@mohammadreza.beygifard
@mohammadreza.beygifard Жыл бұрын
Man, the video was great, it made lots of stuff more clear for me. Thank you for it!
@ChandraShekhar-by3cd
@ChandraShekhar-by3cd 4 жыл бұрын
Welcome Back Champ!! Thanks for the informative video on this topic,most of the online sites are quite confusing but you made it quite clear.Please post more videos on advanced C++ topics such as lambda function , constexpr , and new feature of C++ 17 and C++ 20....Also could you please suggest online materials for c++ that you refer usually? Thanks.STAY SAFE HOME!
@SkyrimCZtutorials
@SkyrimCZtutorials 4 жыл бұрын
Great explanation as always! Thanks for making these videos!
@juststudy3703
@juststudy3703 2 жыл бұрын
Definitely one of the best detailed explanation on l and r values in c++ Thanks!
@tehLyrex
@tehLyrex 4 жыл бұрын
If I remember correctly, then Titus Winter (or was it Herb Sutter?) gave a pretty good talk at CppCon some time in the past where he talked about all kind of value types. Very simply spoken, he just said: Everything that has a name is a lvalue, everything that doesn't is a rvalue. In detail it sure gets more complicated than that, but I found that explanation quite intuituve and maybe it helps somebody.
@oracleoftroy
@oracleoftroy 4 жыл бұрын
I like STL's (Stephan T. Lavavej) explanation, if you can get its address, its an lvalue, otherwise its an rvalue. This covers cases where an lvalue might not have a name, like as the result of a getter function call.
@MatthijsvanDuin
@MatthijsvanDuin 4 жыл бұрын
@@oracleoftroy I was going to object "you can take the address of an xvalues (which are rvalues but not prvalues)" but I wisely tested that before posting and.... you actually can't! even though an xvalue is an already constructed object that _has_ an address, turns out the compiler won't let you use the address-of operator on it.... TIL
@rvoros
@rvoros 4 жыл бұрын
@@oracleoftroy well... how about this: #include void f(const int& i) { const int* p = &i; std::cout
@oracleoftroy
@oracleoftroy 4 жыл бұрын
@@MatthijsvanDuin I wouldn't be surprised if there are exceptions, the goal after all is to have a reasonable approximation that works in many situations. STL's version works remarkably well in practice.
@oracleoftroy
@oracleoftroy 4 жыл бұрын
@@rvoros No, *i* has an address on the stack that you are printing out. An rvalue like *10* does not have an address. Even change the parameter to *const int &&i* and *i* will itself be an lvalue that takes an rvalue.
@deutschWallah
@deutschWallah 2 жыл бұрын
Thanks a lot Yan. This C++ series is really the best on KZfaq :)
@carterfang95
@carterfang95 3 жыл бұрын
Way more clear than the articles I've tried to read.. thanks a lot!!
@magessm5228
@magessm5228 4 жыл бұрын
Great explanation Mr. Черников Rly like your way of explaining things Thank you very much for the info and knowledge you provide : )
@mulayvaibhav
@mulayvaibhav 2 жыл бұрын
Explained beautifully! appreciate the clarity it provides
@marbangens
@marbangens 4 жыл бұрын
I love to listen when you talk about c++ don't stop pleas. This is gold.
@neerajbute2094
@neerajbute2094 4 жыл бұрын
For the love of god, please don't stop making videos. Btw , would like to see more on move semantics in c++. Thanks for the content.
@Max-dj4kd
@Max-dj4kd 2 жыл бұрын
I was so daunted by this going into it but your explanation was so good, thanks!
@372leonard
@372leonard 4 жыл бұрын
never heard this been explained so clear
@Codeaholic1
@Codeaholic1 4 жыл бұрын
Locator? Never heard of that. I always heard them as left-hand and right-hand values. Although as you point out they aren't always on the left or right of an equals. Then again I learned lvalue and rvalue in C first. Also really glad you decided to cover move semantics. I was left wanting after your smart pointer video. There's so much opportunity to talk about heap allocation ownership and tying lifetime to stack variables that can be moved.
@LunaticaPirate93
@LunaticaPirate93 2 жыл бұрын
Thank you so much! It was a really clean explanation and got all my questions answered :)
@sasa23290
@sasa23290 3 жыл бұрын
Perfect. Fantastic topic. This topic is very tied to move semantics as you already said. C++ is a great language because a programmer can manually do whatever he wants to reduce copying, manipulate with memory, do some optimization but if there is no awareness of that, using c++ has no much sense. It is like you want to clean your bathroom but with no special reason to do that. Good job!
@santoshjanakiraman8907
@santoshjanakiraman8907 Жыл бұрын
Really appreciate the good work you're doing!
@xuxusito
@xuxusito 4 жыл бұрын
I'm actually learning c++ since 2 months now and this kind of Videos about c++ makes me happy that I decided to pick up c++ . I started with c and python because it was recommended everywhere but with python it was like owning a iPhone or working with windows. It's very simple to use and intuitive but you just don't feel satisfied. C++ is like switching to android or linux. You are overwhelmed by the freedom and possibilities and it just feels amazing to learn all the things and feel the power of that systems. I hope that makes sense.
@ycombinator765
@ycombinator765 2 жыл бұрын
man I hated Python, and I still sometimes do
@hsaidinsan6345
@hsaidinsan6345 4 жыл бұрын
Thanks for the video We are really looking forward to see your videos on design patterns 😇
@diegosolis9681
@diegosolis9681 4 жыл бұрын
C/C++ are my favorite programming languages. I love to learn new things about them and the way this clarifies lvalues and rvalues is absolutely fantastic, thanks a lot.
@befikerbiresaw9788
@befikerbiresaw9788 3 жыл бұрын
Dude you really have a gift for explaining stuff. C++ and opengl programming has become very easy for me thank you
@armaghanasghar2911
@armaghanasghar2911 3 жыл бұрын
Really enjoy your work @The Cherno
@averageguy985
@averageguy985 4 жыл бұрын
Thanks for making C++ so easy for me. Really appreciate all your hard work in it ^_^
@ChlorieHCl
@ChlorieHCl 4 жыл бұрын
There's something wrong in this explanation, and it's really easy to get wrong. I have to mention it here in case anyone get confused. *_Initialization is not assignment_* , though they share the equals sign... Assuming s is an std::string, when you do { std::string t = s; } that's *_initialization_* , calling the copy *_constructor_* std::string(const std::string&); when you do { std::string t; t = s; } that's *_assignment_* , calling the copy *_assignment operator_* std::string& operator=(const std::string&); You see, these two equals signs are calling different member functions, since they're inherently different operations. Although there should be no difference in the result, but first default construct an object an immediately reassign it is performance-wise not efficient. It's all the same when rvalue references are in the question, e.g. { std::string t = std::string("I'm a string"); } is calling the move *_constructor_* , std::string(std::string&&); on the other hand { std::string t; t = std::string("I'm a string"); } is calling the move *_assignment operator_* , std::string& operator=(std::string&&); Several videos titled "Back to Basics" in cppcon explain these basic C++ knowledge really clearly, so if anyone needs more detailed and thorough explanations please refer to those videos.
@user-dy3br3wy2o
@user-dy3br3wy2o 3 жыл бұрын
thx!!!!!!
@guiller2371
@guiller2371 2 жыл бұрын
Thanks. This comment definitely adds value to the video.
@gongchen7308
@gongchen7308 Жыл бұрын
I love your demonstrations, it clarifies everything
@manuelreche3735
@manuelreche3735 4 жыл бұрын
I went from 0 to intermediate in C++ thanks to your C++ series. Keep it up! Thank you.
@h.hristov
@h.hristov 4 жыл бұрын
Thank you. Expecting to see a video on move semantics soon
@jessprogany4345
@jessprogany4345 3 жыл бұрын
loving your C++ videos hope to see more of it
@khangnguyenhuu2814
@khangnguyenhuu2814 3 жыл бұрын
Thank you so much, i've only started learning C++ recently and this is just what i need
@barjeshbarjesh8215
@barjeshbarjesh8215 2 жыл бұрын
The explanation can't be simpler than what Cherno mentioned. I am totally impressed.
@TusharHaral
@TusharHaral 4 жыл бұрын
*You just make it so simple. Thanks. BTW the large font used in IDE makes reading code easy to viewers. Nice.*
@commercial3750
@commercial3750 Жыл бұрын
This was extremely helpful. I wish I found this video series earlier in my quarter, it would have helped me not bomb my first midterm lmao. Thanks to you though, there's still hope for my final. Thank you so much
@jonathanmoore5619
@jonathanmoore5619 4 жыл бұрын
Always clear, always good. Thanks
@j.r.waheed4610
@j.r.waheed4610 Жыл бұрын
Thank you for clarifying this topic. Well done.
@LokeshKumar-os6ux
@LokeshKumar-os6ux 4 жыл бұрын
you nailed it man, please make more videos like this.
@sidharthsharma8588
@sidharthsharma8588 2 жыл бұрын
Thanks for sharing wonderful stuff Yan
@mahdishirazi5785
@mahdishirazi5785 2 жыл бұрын
one of the videos worth watching over and over again (and thanks so much for that double ampersand, for a whole year i thought it meant reference of a reference and that made me confused af xD)
@Vermilicious
@Vermilicious 4 жыл бұрын
I had forgotten about this topic, but you made it clear and quick.
@kennithsalado7212
@kennithsalado7212 Жыл бұрын
Quick and direct to the point, really great.
@jackwu
@jackwu 4 жыл бұрын
Helps a lot!!. This is very clear explanation, especially the provided sample code example.
@sasamilenkovic6053
@sasamilenkovic6053 4 жыл бұрын
This C++ series is excellent. Thank you TheCherno!
@mykalesalad
@mykalesalad Жыл бұрын
This was a very clear explanation, thank you. I'm about to watch the move semantics video.
@kacperozieblowski3809
@kacperozieblowski3809 4 жыл бұрын
that just made me understand everything that I couldn't with c++ reference. you're a wizard. thanks
@akshaynaik4888
@akshaynaik4888 4 жыл бұрын
I was trying to understand this a year ago but left it there because too much information, this 10 minutes video made it crystal clear, thanks
@jaimebaron3299
@jaimebaron3299 4 жыл бұрын
Wow, I´ve had problems in my code, and I had no idea why it didn´t work, and noticed that it only worked on saved variables. Thanks to this, you´ve basically solved my problem, and can now edit it to make my some work. Thank you very much ^^
@silverqx
@silverqx 3 жыл бұрын
Best sum up about glvalues and prvalues I saw, nicely described what is going on and what consequences and benefits it brings. ♥
@bharanidharans5857
@bharanidharans5857 2 жыл бұрын
Great Explanation. Thanks for making it clear & stronger understanding
@jayys7745
@jayys7745 3 жыл бұрын
Wow this was very helpful & straight to the point ! thank you !
@ramitgupta9919
@ramitgupta9919 3 жыл бұрын
I am a big fan Just love the videos I love that you give a reason for everything
@danbhakta
@danbhakta 4 жыл бұрын
My God man. Watching C++ again brings back nightmares. Subbed!
@Bill-gc9bt
@Bill-gc9bt 4 жыл бұрын
Love your videos, at least until this one. I've been programming in C++ for about ten years, but I've never been so confused until now. I get the feeling that you think this topic is easy, and so you're blasting through your delivery in a seemingly nonchalant manner. This is because you're a freaking genius! This topic is ridiculously nuanced and complex, in my opinion. Can you recommend a source where I can learn the topic of lvalues and rvalues at an introductory level?
@lilgohan
@lilgohan 3 ай бұрын
this is one thing I thought I'd never understand, but, as with most topics, you made it easy. thanks
@sayoojm3446
@sayoojm3446 4 жыл бұрын
Easily explained ... struggled to understand this two months back but when u illustrates it just seems like a peice of cake . 😁😁😁
@alextiga8166
@alextiga8166 4 жыл бұрын
Finally! Thank you for the video.
@zoltantorok1189
@zoltantorok1189 8 ай бұрын
WOW. I definitely need to watch this 5 more times and take 3 sets of notes, this is actually really useful and ingenious.
@pythonpc8090
@pythonpc8090 4 жыл бұрын
Yeah!!! C++ series!!! Love that!^)
Continuous Integration in C++
14:42
The Cherno
Рет қаралды 82 М.
Move Semantics in C++
13:10
The Cherno
Рет қаралды 282 М.
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 23 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 50 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 10 МЛН
CONST in C++
12:54
The Cherno
Рет қаралды 394 М.
ITERATORS in C++
17:09
The Cherno
Рет қаралды 202 М.
Stack vs Heap Memory in C++
19:31
The Cherno
Рет қаралды 554 М.
References in C++ Explained
15:03
Caleb Curry
Рет қаралды 96 М.
SINGLETONS in C++
19:16
The Cherno
Рет қаралды 195 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 734 М.
How to make C++ run FASTER (with std::async)
23:10
The Cherno
Рет қаралды 256 М.
Введение в ИТ. Rvalue-ссылки и семантика перемещения
20:59
Робототехника и комплексная автоматизация
Рет қаралды 5 М.