Modern C++ (move semantics, perfect forwarding)

  Рет қаралды 22,624

CopperSpice

CopperSpice

Күн бұрын

Пікірлер: 14
@ZirJo
@ZirJo 9 ай бұрын
Excellent explanations and good support slides! Thank you.
@markf5931
@markf5931 3 жыл бұрын
My first video of this series, but this is the best combination of conciseness and depth for any C++ learning on yt. Well done!
@CopperSpice
@CopperSpice 3 жыл бұрын
Creating this video was a challenge but really worth the effort. Defining all these pieces takes a lot of time. We hope you enjoy the other videos.
@elyxthelynx
@elyxthelynx 4 жыл бұрын
These are very informative videos! Thank you so much!
@Luca-hn2ml
@Luca-hn2ml 5 жыл бұрын
Very explicit, clear and detailed. Awesome!
@zsoltory4176
@zsoltory4176 5 жыл бұрын
I like your videos, and use them as an excellent source to learn C++ in depth and to deepen my knowledge. Let me share an example. The following example may be useful to understand and teach the difference between left value references and right value references. Left value references correspond to symbolic links in a filesystem, since they refer to the name of a file. In contrast right-value references correspond to hard links, since they refer to the content (in UNIX-based Operating Systems, this is normally the inode) of a file. Thus left value references live in a filesystem's NAMEspace, whereas right value references live in the space of the named objects.
@CopperSpice
@CopperSpice 5 жыл бұрын
We are very happy to hear that our videos are helping you understand C++. As a suggestion please be aware there are no such terms as "left value reference" or "right value reference" in the standard. The correct terminology is lvalue reference and rvalue reference. These are always in lower case and there is no dash. Your analogy is interesting however it does not represent C++ references accurately. I agree that a symbolic link can associate filename A with filename B. This is not how references work since symbols do not exist at run time, they are fully resolved at link time. A C++ reference of any kind, whether it is an lvalue or an rvalue, refers to a particular object never a name.
@hankhuang4714
@hankhuang4714 Жыл бұрын
Thanks for the good video! For 13:10, when you explain the value category of Widget && args, I think it should be rvalue. Since you pass it with a move, and move is to cast it into a rvalue reference, which I think the value it self should be rvalue? Or it should be it original value category before it cast by std::move()? Thanks.
@CopperSpice
@CopperSpice Жыл бұрын
Nope, the parameter "arg" has a value category of lvalue as we stated in the video. There are two ampersands in the function declaration because we are receiving an argument that was passed as an rvalue. This is the surprising place where an rvalue is bound to "an rvalue reference" and then becomes an lvalue since it now has a name.
@davidnguyen9023
@davidnguyen9023 2 жыл бұрын
Thank you for explaining perfect forwarding!
@المعلمليوناردو
@المعلمليوناردو 6 жыл бұрын
very nice please Dont Stop
@thomasdaurel9581
@thomasdaurel9581 3 жыл бұрын
Very clear, thank you
@peperudpeperudski1911
@peperudpeperudski1911 3 жыл бұрын
Very well done! I feel however, the move semantics were barely mentioned, and need quite a bit more depth.
@CopperSpice
@CopperSpice 3 жыл бұрын
Can you let us know what questions you have related to move semantics? We may be able to answer your questions or direct you to another video we have done.
C++ Undefined Behavior
14:49
CopperSpice
Рет қаралды 6 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Modern C++ (data types, references)
17:42
CopperSpice
Рет қаралды 16 М.
Re-inventing move semantics in modern C++ in 13 minutes
13:20
Code for yourself
Рет қаралды 7 М.
C++ 11: Rvalue Reference -- Move Semantics
14:22
Bo Qian
Рет қаралды 151 М.
C++11 Miniseries: Perfect Forwarding
7:37
Acheron
Рет қаралды 5 М.
C++ Move Semantics and R-Value References
14:16
srcmake
Рет қаралды 7 М.
std::move and the Move Assignment Operator in C++
16:06
The Cherno
Рет қаралды 181 М.
Type Traits
13:37
CopperSpice
Рет қаралды 14 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН