Move Semantics in C++
Video Statistics and Information
Channel: The Cherno
Views: 128,416
Rating: 4.9427304 out of 5
Keywords: cherno, c++, programming, gamedev, game development, learn c++, c++ tutorial, move semantics, lvalue, rvalue, lvalues and rvalues, move constructor, move operator, move, move c++
Id: ehMg6zvXuMY
Channel Id: undefined
Length: 13min 10sec (790 seconds)
Published: Fri May 29 2020
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
This guy has taught me more than my professors did....Thank you
Him and Jason Turner are the ones I go for when I need to check or want to know more about C++, might not be as useful for someone with years of experience.
There are several mistakes, which are already noted in youtube comments, so if you are new and learning, check it.
cherno is amazing
At first when he did the cast to string&& I almost had an seizure, but then luckily he changed it to std::move
Pheew :)
Can anyone clear my doubt please :
at first he had created the Entity object as :
Entity entity(String("Cherno"));
But at https://youtu.be/ehMg6zvXuMY?t=429 he changed it to :
Entity entity("Cherno");
And it works fine. Is there a concept I am missing here ?
Entity's constructor expects String type object, we aren't providing that. Does it happen because String class has a constructor that expects const char* ?
Very nicely explained. Thank you!
great alternative