@[email protected] to [email protected]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-square6fedilinkarrow-up19arrow-down10cross-posted to: [email protected][email protected]
arrow-up19arrow-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.com@[email protected] to [email protected]English • 1 year agomessage-square6fedilinkcross-posted to: [email protected][email protected]
minus-square@[email protected]OPlinkfedilinkEnglish1•1 year agoI think compiler move return value by default, so even without NRVO you should never move a return value when it’s a local non reference variable.
minus-square@[email protected]linkfedilinkEnglish1•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?
I think compiler move return value by default, so even without NRVO you should never move a return value when it’s a local non reference variable.
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?