C++ 11: Rvalue Reference -- Move Semantics

C++ 11: Rvalue Reference -- Move Semantics

Bo Qian

10 лет назад

149,014 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Pupperoni
Pupperoni - 27.06.2023 12:26

Very nice explanation. Thanks.

Ответить
James Goforth
James Goforth - 08.06.2023 06:35

No kidding, this is the first time this made perfect sense to me, thank you sir. I subscribed to your channel

Ответить
Júnior Silva
Júnior Silva - 31.05.2023 22:59

Thank you! Great explanation!

Ответить
Anil Upadhyay (M18EE001)
Anil Upadhyay (M18EE001) - 13.01.2023 08:46

Thanks a lot for such excellent content with a beautiful explanation. Kindly share other latest versions too.

Ответить
Raghul Prakash
Raghul Prakash - 04.01.2023 02:52

excellent

Ответить
X Xiao
X Xiao - 23.11.2022 23:23

Would be wonderful to upgrade this series to c++20

Ответить
Michel Romero
Michel Romero - 03.11.2022 00:59

Thanks for this videos! Unitl now I was creating move constructors like it was alchemy

Ответить
Liveon Phoenix
Liveon Phoenix - 24.10.2022 13:45

How does this syntax being ok? "rhs.arr_ = nullptr", while before hand the pointer "arr_ = rhs.arr" is pointing to it?

Ответить
Dexter Aparicio
Dexter Aparicio - 26.09.2022 16:40

Compared to other C++ tutorials, this one clearly has the touch of a master.

Ответить
D.Dinesh Kumar Reddy
D.Dinesh Kumar Reddy - 15.07.2022 08:13

Can anyone please explain me how constructor is calling with the function calling ?

Ответить
Master Mati
Master Mati - 28.06.2022 02:22

This tutorial is fucking great.

Ответить
Justin Broaddus
Justin Broaddus - 10.06.2022 21:20

Can we just acknowledge how much of a legend this guy is. These tutorials are honking good!

Ответить
Toni
Toni - 13.01.2022 07:00

Great video

Ответить
H W
H W - 22.11.2021 21:56

awesome video. I"ve been learning cpp b/c of the new work. And lots of nuances that I need to learn from a java background.

Ответить
Charon IV
Charon IV - 18.10.2021 07:22

You sound like erchito

Ответить
L S
L S - 11.05.2021 20:56

this video was an ablosute eye opener! thank you so much :)

Ответить
Averell
Averell - 04.09.2020 13:08

With g++ passing a rvalue will perform a copy elision. So we need to disable copy elision in order to see a move constructor called.

Ответить
dk dk
dk dk - 17.08.2020 01:28

great tutorial, very clearly illustrated, much better than many so called professor.

Ответить
Boyuan Li
Boyuan Li - 27.05.2020 14:35

Clear and clean. Thank you!

Ответить
Ramin Kord
Ramin Kord - 04.05.2020 00:20

Thank u for your clear explanation, it was very educational.

Ответить
Andreas Hadjigeorgiou
Andreas Hadjigeorgiou - 03.05.2020 18:36

Thank god someone who explained the usage of move constructors without giving the example of push_back for vectors!

Ответить
Music Fan
Music Fan - 27.04.2020 02:14

good video, very well explained

Ответить
balygaby
balygaby - 25.04.2020 13:18

It's hard to talk about this when you can't pronounce R nor L

Ответить
drfpslegend
drfpslegend - 26.02.2020 08:35

Fucking fantastic explanations my dude, I'm super glad I found your video :)

Ответить
Natsu Dragneel
Natsu Dragneel - 02.02.2020 10:17

Why not just use pass by const reference instead of the move semantics?

Ответить
Igoor Silver
Igoor Silver - 24.10.2019 20:10

I have one question, is this useful when you have static arrays?

Ответить
Yuqing Wang
Yuqing Wang - 24.10.2019 03:49

You should really run your code time to time to show that it is working. In my code, both foo methods called copy constructor.

Ответить
Ariel Spalter
Ariel Spalter - 14.10.2019 19:54

I love your tutorials. They are clear and excellent paced.

Ответить
Eric Ouellet
Eric Ouellet - 18.06.2019 17:14

Great Video! I understand a lots with you. Thanks so much! (Not important but just mention that I agree with Taras)

Ответить
malhar jajoo
malhar jajoo - 09.04.2019 16:16

Excellent explanation:
1) Explains what lvalue and rvalue are
2) Explains what lvalue reference and rvalue reference are.
3) Explains how they enable function overloading => they will also result in constructor overloading
4) Introduces Move constructor (that will be called implicitly now instead of Copy constructor when dealing with rvalues)
5)

Ответить
Hilian86
Hilian86 - 05.04.2019 20:11

How would you implement those functions?

Ответить
KayOS Code
KayOS Code - 21.03.2019 00:43

I have always just used const references

but I might be able to find a use for this, I just don't see any reason to force it's use in my code

Ответить
Lúcio José Beirão
Lúcio José Beirão - 17.03.2019 00:43

How to goal kick lmao

Ответить
Esteban Salami
Esteban Salami - 02.03.2019 13:17

finally the video i was looking for !!!! u r my hero

Ответить
wei li
wei li - 13.09.2018 08:36

where can I download the ppt?

Ответить
gab999gg
gab999gg - 06.09.2018 15:58

Good explanations on the move semantics ! Thank you !

Ответить
David Anderson
David Anderson - 14.08.2018 05:27

Bo, I'm not sure if it was mentioned in the history of comments, but should you ever redo this (very nice) video, you might want to discuss copy elision. Some viewers may be at a loss to explain why their move constructor does not get called because the compiler is allowed to elude copying (darn smart compilers). Nice work though... Love your videos!

Ответить
SomeoneCalledJoshua
SomeoneCalledJoshua - 17.07.2018 21:37

You, sir, have some of the clearest explanations of the complicated C++11+ examples I've seen - and I've read a lot of them. Thank you for taking your time to make these, I will recommend your channel to others learning C++.

Ответить