Be Careful With Braces When Returning
Let's observe some seemingly ordinary code and understand why it can potentially be harmful.
We'll cover the following...
We'll cover the following...
You might be surprised by the following code:
According to the Standard if you wrap a return value into braces {} then you prevent move operations from happening. The returned object will be copied only.
This is similar to the case with non-copyable types:
...