This patch is very closely related to D4859. Please see http://reviews.llvm.org/D4859 for more information.
This patch adds support for "fancy" pointers and allocators to promise and packaged_task. The changes made to support this are exactly the same as in D4859.
This repetitive code bothers me; both here and in D4859.
I don't see an obvious way to package it up, though.
(Yes, I know it's just types, not actual code, but if it's in multiple places in the source, there's a chance that it's wrong in one or more of them)