(C++) move constructor

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) move constructor

 

A move constructor is a type of constructor.

 

 

 

 

 

Examples

 

  • move constructor example 1: basics

 

 

 

 

 

Advice

 

  • For large return type, use a move constructor [1]

 

 

 

 

 

References

 

  1. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 18.5. Advice. page 547: '[4] For large results, use a move constructor'

 

 

 

 

 

 

Contents

  1. 1Examples
  2. 2Advice
  3. 3References