[PATCH] D53670: Revert "Teach __libcpp_is_floating_point that __fp16 and _Float16 are"
Petr Hosek via Phabricator
reviews at reviews.llvm.org
Wed Oct 24 14:01:09 PDT 2018
phosek created this revision.
phosek added reviewers: ldionne, mclow.lists, EricWF.
Herald added subscribers: libcxx-commits, christof.
This reverts commits r333103 and r333108. _Float16 and __fp16 are C11
extensions and compilers other than Clang don't define these for C++.
See https://reviews.llvm.org/D53486 for related discussion.
Repository:
rCXX libc++
https://reviews.llvm.org/D53670
Files:
libcxx/include/type_traits
libcxx/test/libcxx/type_traits/is_floating_point.pass.cpp
Index: libcxx/test/libcxx/type_traits/is_floating_point.pass.cpp
===================================================================
--- libcxx/test/libcxx/type_traits/is_floating_point.pass.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// <type_traits>
-//
-// Test that is_floating_point<T>::value is true when T=__fp16 or T=_Float16.
-
-#include <type_traits>
-
-int main() {
-#ifdef __clang__
- static_assert(std::is_floating_point<__fp16>::value, "");
-#endif
-#ifdef __FLT16_MANT_DIG__
- static_assert(std::is_floating_point<_Float16>::value, "");
-#endif
- return 0;
-}
Index: libcxx/include/type_traits
===================================================================
--- libcxx/include/type_traits
+++ libcxx/include/type_traits
@@ -738,12 +738,6 @@
// is_floating_point
template <class _Tp> 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<float> : public true_type {};
template <> struct __libcpp_is_floating_point<double> : public true_type {};
template <> struct __libcpp_is_floating_point<long double> : public true_type {};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53670.170978.patch
Type: text/x-patch
Size: 1761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181024/2cea198b/attachment.bin>
More information about the libcxx-commits
mailing list