[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 07:42:06 PDT 2021
ldionne created this revision.
ldionne added a reviewer: Quuxplusone.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
All supported versions of GCC now do the right thing.
Repository:
rG LLVM Github Monorepo
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.369697.patch
Type: text/x-patch
Size: 1291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210831/ad7e8eb8/attachment.bin>
More information about the libcxx-commits
mailing list