In order to properly type-erase the executor in the second part of the promise contract return, invocation of then_execute on the type-erased executor needs to be part of that type's interface (i.e., the executor and the future token or whatever need to be type-erased at the same time). Including this in the interface for the promise contract also has the advantage that we no longer have to add the promise contract to the requirements for ThenExecutor
In order to properly type-erase the executor in the second part of the promise contract return, invocation of
then_execute
on the type-erased executor needs to be part of that type's interface (i.e., the executor and the future token or whatever need to be type-erased at the same time). Including this in the interface for the promise contract also has the advantage that we no longer have to add the promise contract to the requirements forThenExecutor