Patch constributed by Michel Moren in http://llvm.org/bugs/show_bug.cgi?id=13592 . Fixes is_convertible<From, To> when To is an abstract type.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2012-08-13 12:29:17 +00:00
parent 4490c4aaed
commit e87514aa94

View File

@ -612,7 +612,8 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_abstract : public __libcpp_abstra
#if __has_feature(is_convertible_to)
template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
: public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
: public integral_constant<bool, __is_convertible_to(_T1, _T2) &&
!is_abstract<_T2>::value> {};
#else // __has_feature(is_convertible_to)