草庐IT

c++ - 复制省略和临时绑定(bind)引用对象

C++草案指出:12.8p31Thiselisionofcopy/moveoperations,calledcopyelision,ispermittedinthefollowingcircumstances(whichmaybecombinedtoeliminatemultiplecopies):(...)whenatemporaryclassobjectthathasnotbeenboundtoareference(12.2)wouldbecopied/movedtoaclassobjectwiththesamecv-unqualifiedtype,thecopy/moveoper