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:
parent
4490c4aaed
commit
e87514aa94
@ -612,7 +612,8 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_abstract : public __libcpp_abstra
|
|||||||
#if __has_feature(is_convertible_to)
|
#if __has_feature(is_convertible_to)
|
||||||
|
|
||||||
template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
|
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)
|
#else // __has_feature(is_convertible_to)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user