gracicot to C++English · 1 year 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 · 1 year agomessage-square7fedilinkcross-posted to: cpp@programming.devcpp@programming.dev
minus-squaretunetardis@lemmy.calinkfedilinkEnglisharrow-up1·1 year 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·1 year 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