__invokable and __invoke_of now check for incomplete types and issue a compile-time diagnostic if they are used with incomplete types for anything except a return type.  Note that both arguments *and* parameters are checked for completeness.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131818 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/memory b/include/memory
index d9dda72..29fb070 100644
--- a/include/memory
+++ b/include/memory
@@ -3586,10 +3586,10 @@
 public:
     weak_ptr();
     template<class _Yp> weak_ptr(shared_ptr<_Yp> const& __r,
-                   typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat>::type = __nat());
+                   typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat*>::type = 0);
     weak_ptr(weak_ptr const& __r);
     template<class _Yp> weak_ptr(weak_ptr<_Yp> const& __r,
-                   typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat>::type = __nat());
+                   typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat*>::type = 0);
 
     ~weak_ptr();
 
@@ -3640,7 +3640,7 @@
 template<class _Yp>
 inline _LIBCPP_INLINE_VISIBILITY
 weak_ptr<_Tp>::weak_ptr(shared_ptr<_Yp> const& __r,
-                        typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat>::type)
+                        typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat*>::type)
     : __ptr_(__r.__ptr_),
       __cntrl_(__r.__cntrl_)
 {
@@ -3652,7 +3652,7 @@
 template<class _Yp>
 inline _LIBCPP_INLINE_VISIBILITY
 weak_ptr<_Tp>::weak_ptr(weak_ptr<_Yp> const& __r,
-                        typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat>::type)
+                        typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat*>::type)
     : __ptr_(__r.__ptr_),
       __cntrl_(__r.__cntrl_)
 {