C++ : Why is the copy constructor called instead of the move constructor when returning?

Channel:
Subscribers:
76,400
Published on ● Video Link: https://www.youtube.com/watch?v=eUEhYNFyvv4



Game:
Duration: 1:01
0 views
0


C++ : Why is the copy constructor called instead of the move constructor when returning?
To Access My Live Chat Page,
On Google, Search for "hows tech developer connect"

So here is a secret hidden feature I promissed to tell you.
This is a YouTube's feature which works on Desktop.
First, Make sure this video is playing.
Then, type the letters 'awesome' on your keyboard as the next step.
It will change your youtube progress bar into a flashing rainbow.

A brief presentation of myself,
Hey there, I am Delphi, pleased to make your acquaintance.
I am here to provide you with assistance in answering your questions.
C++ : Why is the copy constructor called instead of the move constructor when returning?
I am available to answer your more detailed queries via comments or chat.
If you have an answer or any additional information on the answer, please leave a comment below.
Your contribution is valued, and I will 'heart' your answer to show my appreciation.
move instead copy the the of C++ : when Why returning? called is constructor constructor