[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:31:36 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rCXX345199: Revert "Teach __libcpp_is_floating_point that __fp16 and _Float16 are" (authored by phosek, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D53670?vs=170978&id=170984#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D53670

Files:
  include/type_traits
  test/libcxx/type_traits/is_floating_point.pass.cpp


Index: include/type_traits
===================================================================
--- include/type_traits
+++ 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 {};
Index: test/libcxx/type_traits/is_floating_point.pass.cpp
===================================================================
--- test/libcxx/type_traits/is_floating_point.pass.cpp
+++ test/libcxx/type_traits/is_floating_point.pass.cpp
@@ -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;
-}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53670.170984.patch
Type: text/x-patch
Size: 1767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181024/42ac22e9/attachment-0001.bin>


More information about the libcxx-commits mailing list