gracicot to C++English · 2 years agoThe move constructor that you have to declare, even though you don't want anyone to actually call it - The Old New Thingdevblogs.microsoft.comexternal-linkmessage-square7fedilinkarrow-up18arrow-down10cross-posted to: cpp@programming.devcpp@programming.dev
arrow-up18arrow-down1external-linkThe move constructor that you have to declare, even though you don't want anyone to actually call it - The Old New Thingdevblogs.microsoft.comgracicot to C++English · 2 years agomessage-square7fedilinkcross-posted to: cpp@programming.devcpp@programming.dev
minus-squaretunetardis@lemmy.calinkfedilinkEnglisharrow-up1·2 years agoWell the test3 example FTA gives a case where NRVO would not happen because of the conditional return value. Are you suggesting that you need not std::move even in this case?
minus-squaregracicotOPlinkfedilinkEnglisharrow-up1·2 years agoI would still say “no” since they are local objects and they are gonna be moved from implicitly anyway
Well the
test3
example FTA gives a case where NRVO would not happen because of the conditional return value. Are you suggesting that you need notstd::move
even in this case?I would still say “no” since they are local objects and they are gonna be moved from implicitly anyway