How does guaranteed copy elision work?
问题 At the 2016 Oulu ISO C++ Standards meeting, a proposal called Guaranteed copy elision through simplified value categories was voted into C++17 by the standards committee. How exactly does guaranteed copy elision work? Does it cover some cases where copy elision was already permitted, or are code changes needed to guarantee copy elision? 回答1: Copy elision was permitted to happen under a number of circumstances. However, even if it was permitted, the code still had to be able to work as if the