Home » Copy elision in C++

Copy elision in C++

by Online Tutorials Library

Copy elision in C++

Copy elision is defined as an optimisation technique that is used to avoid the unnecessary copying of objects. Generally, all the compilers use the technique of copy elision. The optimisation technique is not available to a temporary object that is bound to a reference.

It is also known as copy omission.

Let us understand the need for copy elision with the help of an example.

Code

You may also like