rearrange folly::Function so that its template arguments are deducable.
authorEric Niebler <eniebler@fb.com>
Wed, 4 May 2016 21:45:20 +0000 (14:45 -0700)
committerFacebook Github Bot 0 <facebook-github-bot-0-bot@fb.com>
Wed, 4 May 2016 21:50:25 +0000 (14:50 -0700)
commit62b1d04761973f209a7f5f6205ec8aabc10089ed
tree6981401aae777e470773c773b4e54e93b834ad4b
parenta6fd9a69e7814d75195bbbd2a699ed7a6c66ec38
rearrange folly::Function so that its template arguments are deducable.

Summary:
`folly::Function` was an alias to a more complex type with template arguments that could not be deduced. For example, the call to `foo` below was failing to compile.

```
template <class R, class... As>
void foo(folly::Function<R(As...)> f) {
}

int main() {
  foo( folly::Function<void(int)>{ [](int i){} } );
}
```

Rearrange the code so that folly::Function is no longer an alias, thus making its template arguments deducable.

Reviewed By: luciang, spacedentist

Differential Revision: D3256130

fb-gh-sync-id: fb403e48d161635b3b7f36e53b1679eb46cbfe7f
fbshipit-source-id: fb403e48d161635b3b7f36e53b1679eb46cbfe7f
folly/Function.h
folly/test/FunctionTest.cpp