allow passing function pointers to Future::onError()
authorAdam Simpkins <simpkins@fb.com>
Thu, 22 Jun 2017 20:39:56 +0000 (13:39 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 22 Jun 2017 20:51:21 +0000 (13:51 -0700)
commit49f2f8b170dfee4871a84c57d6e149623126a2d3
tree361d1d04db9d6f84b37ef0b89a27cea38992cc58
parent61a0ef5508c64a7e05c574b5314a78a07d2f88dd
allow passing function pointers to Future::onError()

Summary:
Add appropriate specializations for detail::Extract() so that you can pass a
plain function pointer to `onError()`.  Previously the code only worked with
member function pointers and functor-style objects.

Reviewed By: yfeldblum, wez

Differential Revision: D5286773

fbshipit-source-id: 67b44d1d7573eb1da501475045fd24ad4ab1c074
folly/futures/Future-pre.h
folly/futures/test/FutureTest.cpp