From 6e4dacf3f04c990e02dd633672957d3fae47bea6 Mon Sep 17 00:00:00 2001 From: dim Date: Thu, 21 Feb 2019 07:20:17 +0000 Subject: [PATCH] MFC r344261: Pull in r345199 from upstream libc++ trunk (by Petr Hosek): Revert "Teach __libcpp_is_floating_point that __fp16 and _Float16 are floating-point types." This reverts commits r333103 and r333108. _Float16 and __fp16 are C11 extensions and compilers other than Clang don't define these for C++. Differential Revision: https://reviews.llvm.org/D53670 This prevents "_Float16 is not supported on this target" errors in libc++'s type_traits header, in some cases. Reported by: Charlie Li --- contrib/libc++/include/type_traits | 6 ------ 1 file changed, 6 deletions(-) diff --git a/contrib/libc++/include/type_traits b/contrib/libc++/include/type_traits index 30bfb161c0d..479c2e039ff 100644 --- a/contrib/libc++/include/type_traits +++ b/contrib/libc++/include/type_traits @@ -733,12 +733,6 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_integral_v // is_floating_point template struct __libcpp_is_floating_point : public false_type {}; -#ifdef __clang__ -template <> struct __libcpp_is_floating_point<__fp16> : public true_type {}; -#endif -#ifdef __FLT16_MANT_DIG__ -template <> struct __libcpp_is_floating_point<_Float16> : public true_type {}; -#endif template <> struct __libcpp_is_floating_point : public true_type {}; template <> struct __libcpp_is_floating_point : public true_type {}; template <> struct __libcpp_is_floating_point : public true_type {}; -- 2.45.0