(Wangle) Support .then(function pointer) syntax
authorHannes Roth <hannesr@fb.com>
Fri, 7 Mar 2014 16:02:11 +0000 (08:02 -0800)
committerDave Watson <davejwatson@fb.com>
Mon, 10 Mar 2014 20:51:03 +0000 (13:51 -0700)
commit4733fd1c76d97fa6267d789c6c0b2d41749a885c
tree5527060dbca6e8e0c63670a479ef1d4fc8f97f30
parentd3ee99f796194d4506cbc9cedc172c62141934eb
(Wangle) Support .then(function pointer) syntax

Summary:
Support `.then(&static_function)`, `.then(&static_member_function)`, `.then(&Class::static_member_function)`, `.then(instance, &Class::member_function)` in Wangle.

C++ does not allow `.then(instance, &member_function)`, sadly.

This implementation just creates the closure for you and defers to the existing `then` implementations.

Test Plan: Added a test.

Reviewed By: hans@fb.com

FB internal diff: D1204954
folly/wangle/Future.h
folly/wangle/test/FutureTest.cpp