__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.

llvm-svn: 131818
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 5eb6bdfa1da906710073fea242a67b0224297fef
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_)
 {