Reverted previous fix to is_convertible as it caused more problems than it fixed. But this reverted fix will only matter for non-clang compilers. Installed __is_convertible_to for clang.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@124429 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
497ac97247
commit
091c5ace78
@ -598,9 +598,22 @@ template <class _Tp> struct _LIBCPP_VISIBLE is_abstract : public __libcpp_abstra
|
|||||||
|
|
||||||
// is_convertible
|
// is_convertible
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
|
||||||
|
template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
|
||||||
|
: public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
#else // __clang__
|
||||||
|
|
||||||
namespace __is_convertible_imp
|
namespace __is_convertible_imp
|
||||||
{
|
{
|
||||||
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||||
|
template <class _Tp> char __test(const volatile typename remove_reference<_Tp>::type&&);
|
||||||
|
#else
|
||||||
template <class _Tp> char __test(_Tp);
|
template <class _Tp> char __test(_Tp);
|
||||||
|
#endif
|
||||||
template <class _Tp> __two __test(...);
|
template <class _Tp> __two __test(...);
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||||
template <class _Tp> _Tp&& __source();
|
template <class _Tp> _Tp&& __source();
|
||||||
@ -694,6 +707,8 @@ template <class _T1, class _T2> struct _LIBCPP_VISIBLE is_convertible
|
|||||||
static const size_t __complete_check2 = __is_convertible_check<_T2>::__v;
|
static const size_t __complete_check2 = __is_convertible_check<_T2>::__v;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // __clang__
|
||||||
|
|
||||||
// is_base_of
|
// is_base_of
|
||||||
|
|
||||||
// (C) Copyright Rani Sharoni 2003.
|
// (C) Copyright Rani Sharoni 2003.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user