• the_artic_one@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Did you mean to link a different article? This one doesn’t mention RTO at all, just mandatory copy elision and it only shows examples of how moving temporaries is unnecessary (which I was saying should be obvious).

    The fact that moving local variables when returning is bad thanks to RTO is a lot less obvious so that’s definitely a useful tip for devs who are still getting the hang of move semantics.