https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60966
--- Comment #26 from Thomas Sanchez <thomas.sanchz at gmail dot com> --- In the end the problem is quite simple :) One workaround would be to move the promise into the lambda however I would be glad that your patch get accepted, because IMHO it is not an expected behavior from a user point of view ! Thanks a lot for your work !