From: Vitaly Buka Date: Tue, 22 Jan 2019 07:22:45 +0000 (+0000) Subject: Revert "Remove static_assert(value == std::is_trivially_copyable::value)" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe69bd5280112cc9f12ee40ab6df0dfe5200f088;p=llvm Revert "Remove static_assert(value == std::is_trivially_copyable::value)" Upgraded the bot as workaround. This reverts commit r351784. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351786 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/type_traits.h b/include/llvm/Support/type_traits.h index a52bd408d27..b8cf12d03d2 100644 --- a/include/llvm/Support/type_traits.h +++ b/include/llvm/Support/type_traits.h @@ -162,6 +162,10 @@ class is_trivially_copyable { (has_deleted_move_constructor || has_trivial_move_constructor) && (has_deleted_copy_assign || has_trivial_copy_assign) && (has_deleted_copy_constructor || has_trivial_copy_constructor); + +#if (__has_feature(is_trivially_copyable) || (defined(__GNUC__) && __GNUC__ >= 5)) + static_assert(value == std::is_trivially_copyable::value, "inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable"); +#endif };