DEV Community

Discussion on: C++ Interview Questions

Collapse
 
komalsingh1 profile image
Komal Singh

Thanks a lot, Pierre!! I never came across Move Constructor, Got this know this because of you. Thank you so much!

Collapse
 
pgradot profile image
Pierre Gradot

You don't use them everyday, don't worry ;)

They are part of the move semantic that was introduced with C++11. This is not something easy but it can increase performances in some situations.

Note that move constructor pairs with move assignment operator (just like copy ctor pairs with copy assignment operator).

You can check this link: thbecker.net/articles/rvalue_refer...