forked from OSchip/llvm-project
Constrain __bind functor constructor such that it won't accidentally get used as a copy constructor from a non-const lvalue. Fixes <rdar://problem/11359080>.
llvm-svn: 156182
This commit is contained in:
parent
ae29842706
commit
df7aad41fd
|
@ -1707,7 +1707,11 @@ public:
|
|||
|
||||
#endif // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <class _Gp, class ..._BA>
|
||||
template <class _Gp, class ..._BA,
|
||||
class = typename enable_if
|
||||
<
|
||||
is_constructible<_Fd, _Gp>::value
|
||||
>::type>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
|
||||
: __f_(_VSTD::forward<_Gp>(__f)),
|
||||
|
|
Loading…
Reference in New Issue