From 51f5b7864a127e1612fc7a52dab3930e89068b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27Griwes=27=20Dominiak?= Date: Tue, 23 Feb 2021 00:33:23 -0800 Subject: [PATCH] Rename the is_convertible fallback helper to avoid a clash with a keyword. NVCC has changed the behavior of Clang keywords like __is_convertible, so we need to adjust. Bug 3252533 Fixes #118 --- libcxx/include/type_traits | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 2211050d85..f2ad40994f 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -1502,29 +1502,29 @@ struct __is_convertible_check<_Tp, 0> template ::value, unsigned _T2_is_array_function_or_void = __is_convertible_imp::__is_array_function_or_void<_T2>::value> -struct __is_convertible +struct __is_convertible_fallback : public integral_constant::value > {}; -template struct __is_convertible<_T1, _T2, 0, 1> : public false_type {}; -template struct __is_convertible<_T1, _T2, 1, 1> : public false_type {}; -template struct __is_convertible<_T1, _T2, 2, 1> : public false_type {}; -template struct __is_convertible<_T1, _T2, 3, 1> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 0, 1> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 1, 1> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 2, 1> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 3, 1> : public false_type {}; -template struct __is_convertible<_T1, _T2, 0, 2> : public false_type {}; -template struct __is_convertible<_T1, _T2, 1, 2> : public false_type {}; -template struct __is_convertible<_T1, _T2, 2, 2> : public false_type {}; -template struct __is_convertible<_T1, _T2, 3, 2> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 0, 2> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 1, 2> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 2, 2> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 3, 2> : public false_type {}; -template struct __is_convertible<_T1, _T2, 0, 3> : public false_type {}; -template struct __is_convertible<_T1, _T2, 1, 3> : public false_type {}; -template struct __is_convertible<_T1, _T2, 2, 3> : public false_type {}; -template struct __is_convertible<_T1, _T2, 3, 3> : public true_type {}; +template struct __is_convertible_fallback<_T1, _T2, 0, 3> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 1, 3> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 2, 3> : public false_type {}; +template struct __is_convertible_fallback<_T1, _T2, 3, 3> : public true_type {}; template struct _LIBCUDACXX_TEMPLATE_VIS is_convertible - : public __is_convertible<_T1, _T2> + : public __is_convertible_fallback<_T1, _T2> { static const size_t __complete_check1 = __is_convertible_check<_T1>::__v; static const size_t __complete_check2 = __is_convertible_check<_T2>::__v;