CppCon 2018: Jon Kalb “Copy Elision”

Поділитися
Вставка
  • Опубліковано 17 лис 2018
  • CppCon.org
    -
    Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/CppCon/CppCon2018
    -
    Lightning Talk
    -
    Videos Filmed & Edited by Bash Films: www.BashFilms.com
    *-----*
    Register Now For CppCon 2022: cppcon.org/registration/
    *-----*

КОМЕНТАРІ • 11

  • @Max-wk7cg
    @Max-wk7cg 5 років тому +16

    Stuff like this is why taking time to learn x64 assembly is worth it IMO. Great talk

  • @VictorYarema
    @VictorYarema 2 роки тому +2

    This is so underrated video for some reason. Great talk! Thanks!

  • @srcmake
    @srcmake 5 років тому +4

    Wow this makes a lot of sense. I'm definitely going to keep this trick in mind from now on. Thanks!

  • @bimmerboard
    @bimmerboard 5 років тому +6

    That's an excellent explanation! Thanks!

  • @szppeter9482
    @szppeter9482 4 роки тому +3

    Awesome talk, crystal clear.

  • @thiagosantos666
    @thiagosantos666 5 років тому +2

    Great talk, thanks!

  • @cumuIonimbus
    @cumuIonimbus Рік тому

    I love this guy.

  • @kennethstauffer9220
    @kennethstauffer9220 5 років тому +1

    what happens of if an exception is thrown after some write has occurred to the return value? and the assignment to the return value never occurs?

    • @Vicinalace
      @Vicinalace 4 роки тому +3

      Then it's not RVO'd. Methods that return values that are modified through methods that have side-effects can't be optimized in-place by the compiler.

    • @mina86
      @mina86 4 роки тому +2

      The function unwinds stack and calls destructor before it propagates the exception.