[libcxx-commits] [PATCH] D108997: [libc++] Remove workaround for broken __is_trivially_copyable on old GCC

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 31 13:05:45 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe781e03e4033: [libc++] Remove workaround for broken __is_trivially_copyable on old GCC (authored by ldionne).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108997/new/

https://reviews.llvm.org/D108997

Files:
  libcxx/include/type_traits
  libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp


Index: libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp
===================================================================
--- libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp
+++ libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copyable.pass.cpp
@@ -10,10 +10,6 @@
 
 // is_trivially_copyable
 
-// GCC has not implemented Core 2094 which makes volatile
-// qualified types trivially copyable.
-// XFAIL: gcc
-
 #include <type_traits>
 #include <cassert>
 #include "test_macros.h"
Index: libcxx/include/type_traits
===================================================================
--- libcxx/include/type_traits
+++ libcxx/include/type_traits
@@ -3708,13 +3708,7 @@
 // is_trivially_copyable;
 
 template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable
-#if __has_feature(is_trivially_copyable)
     : public integral_constant<bool, __is_trivially_copyable(_Tp)>
-#elif _GNUC_VER >= 501
-    : public integral_constant<bool, !is_volatile<_Tp>::value && __is_trivially_copyable(_Tp)>
-#else
-    : integral_constant<bool, is_scalar<typename remove_all_extents<_Tp>::type>::value>
-#endif
     {};
 
 #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108997.369771.patch
Type: text/x-patch
Size: 1291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210831/1e909904/attachment.bin>


More information about the libcxx-commits mailing list