__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
This commit is contained in:
Howard Hinnant
2011-05-22 00:09:02 +00:00
parent bd89e4b0dd
commit e003ce4899
2 changed files with 148 additions and 5 deletions

View File

@@ -3586,10 +3586,10 @@ private:
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 _Tp>
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 _Tp>
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_)
{