diff --git a/libcxx/include/functional b/libcxx/include/functional --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -2338,14 +2338,14 @@ template , function>, - __invokable<_Fp&, _ArgTypes...> + __invokable<_Fp, _ArgTypes...> >::value> struct __callable; template struct __callable<_Fp, true> { static const bool value = is_same::value || - is_convertible::type, + is_convertible::type, _Rp>::value; }; template @@ -2355,7 +2355,7 @@ }; template - using _EnableIfCallable = typename enable_if<__callable<_Fp>::value>::type; + using _EnableIfLValueCallable = typename enable_if<__callable<_Fp&>::value>::type; public: typedef _Rp result_type; @@ -2366,7 +2366,7 @@ function(nullptr_t) _NOEXCEPT {} function(const function&); function(function&&) _NOEXCEPT; - template> + template> function(_Fp); #if _LIBCPP_STD_VER <= 14 @@ -2380,14 +2380,14 @@ function(allocator_arg_t, const _Alloc&, const function&); template function(allocator_arg_t, const _Alloc&, function&&); - template> + template> function(allocator_arg_t, const _Alloc& __a, _Fp __f); #endif function& operator=(const function&); function& operator=(function&&) _NOEXCEPT; function& operator=(nullptr_t) _NOEXCEPT; - template::type>> + template::type>> function& operator=(_Fp&&); ~function();