Refactored local::promise to be standard conformant