ความคิดเห็น •

  • @andreaszoufal1048
    @andreaszoufal1048 2 วันที่ผ่านมา

    Hi Lieven, just stumbled over this video, I will enjoy it later, for sure! We both worked together on a project, if you remember that time! Greetings from Austria, BR Andi

  • @Roibarkan
    @Roibarkan 2 วันที่ผ่านมา

    35:03 If I understand correctly, the compiler will agree to compile code where the promise type doesn’t implement return_void(), but in such a case it’s undefined behavior for the coroutine to reach the end of its scope (it has to be destroyed via coroutine_handle::destroy() before reaching the end of its scope).

    • @Roibarkan
      @Roibarkan 2 วันที่ผ่านมา

      The wording in the standard (8.7.5.3): If a search for the name return_void in the scope of the promise type finds any declarations, flowing off the end of a coroutine's function-body is equivalent to a co_return with no operand; otherwise flowing off the end of a coroutine's function-body results in undefined behavior.

  • @Roibarkan
    @Roibarkan 2 วันที่ผ่านมา

    59:43 🤓 I actually think await_resume() is actually always called before returning to the coroutine (even when await_ready() returns true, or await_resume() chooses not to suspend, by returning true or the coroutine handle it received)