C++: Difference between revisions

No change in size ,  17 January 2021
Line 571: Line 571:
* Move constructor (since C++11, for <code>std::move</code>)
* Move constructor (since C++11, for <code>std::move</code>)
{{hidden | Example RAII Class |
{{hidden | Example RAII Class |
Stolen from [https://stackoverflow.com/questions/3279543/what-is-the-copy-and-swap-idiom stack overflow]
Copied from [https://stackoverflow.com/questions/3279543/what-is-the-copy-and-swap-idiom stack overflow]
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
#include <algorithm> // std::copy
#include <algorithm> // std::copy