[PATCH] D53486: [libcxx] Only define __libcpp_is_floating_point<_Float16> for Clang
Petr Hosek via Phabricator
reviews at reviews.llvm.org
Sun Oct 21 23:10:31 PDT 2018
phosek created this revision.
phosek added reviewers: EricWF, mclow.lists, ldionne.
Herald added subscribers: libcxx-commits, christof.
GCC doesn't define _Float16 for C++ since this type is only defined
to be a C11 extension, and it's unclear if other compiler do define
this type for C++, so restrict __libcpp_is_floating_point<_Float16>
type trait only to Clang.
Repository:
rCXX libc++
https://reviews.llvm.org/D53486
Files:
libcxx/include/type_traits
Index: libcxx/include/type_traits
===================================================================
--- libcxx/include/type_traits
+++ libcxx/include/type_traits
@@ -741,7 +741,7 @@
#ifdef __clang__
template <> struct __libcpp_is_floating_point<__fp16> : public true_type {};
#endif
-#ifdef __FLT16_MANT_DIG__
+#if defined(__clang__) && defined(__FLT16_MANT_DIG__)
template <> struct __libcpp_is_floating_point<_Float16> : public true_type {};
#endif
template <> struct __libcpp_is_floating_point<float> : public true_type {};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53486.170369.patch
Type: text/x-patch
Size: 576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181022/9c8c5bc1/attachment-0001.bin>
More information about the libcxx-commits
mailing list