fix strange recursive std::is_constructible instantiation involving the Function...
authorEric Niebler <eniebler@fb.com>
Mon, 18 Sep 2017 22:21:34 +0000 (15:21 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 18 Sep 2017 22:34:55 +0000 (15:34 -0700)
commitd3e97ebae9f1e8aaa56287fcc6d0cd792e6bd341
treee62429b72c6baf0bb56b5d84e521557cf48a78fd
parent271977282fe30d3c351b5e8a6f1692d743996ed1
fix strange recursive std::is_constructible instantiation involving the Function converting constructor

Summary: In rare and obscure cases, the fact that `folly::Function`'s perfectly-forwarding, implicit converting constructor was SFINAE-ing on the argument's constructibility was causing a recursive template instantiation of std::is_constructible. Switch to passing the argument by value to avoid the need to test for constructibility.

Reviewed By: yfeldblum

Differential Revision: D5847034

fbshipit-source-id: ce2ad1d2490206c6cae84c17544bd9fcd6ff47bb
folly/Function.h
folly/test/FunctionTest.cpp