The code is undefined behavior in C++11, and ill-formed in C++14. C++14 adds this Remark to the specification of this constructor:
Remarks: These constructors shall not participate in overload
resolution unless f is Callable (20.9.11.2) for argument types
ArgTypes... and return type R.
Callable is defined in [func.wrap.func]/p2:
A callable object f of type F is Callable for argument types ArgTypes
and return type R if the expression INVOKE (f, declval()..., R), considered as an unevaluated operand
(Clause 5), is well formed (20.9.2).
For this INVOKE to be well formed, the return type of INVOKE without the R must be implicitly convertible to R ([func.require]/p2).
In C++11 these statements were under a Requries clause, which means it is up to the client to get them right, and if the client fails, anything can happen, including successful compilation.
This was changed by LWG 2132.