[llvm] r351786 - Revert "Remove static_assert(value == std::is_trivially_copyable<T>::value)"

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 21 23:22:45 PST 2019


Author: vitalybuka
Date: Mon Jan 21 23:22:45 2019
New Revision: 351786

URL: http://llvm.org/viewvc/llvm-project?rev=351786&view=rev
Log:
Revert "Remove static_assert(value == std::is_trivially_copyable<T>::value)"

Upgraded the bot as workaround.

This reverts commit r351784.

Modified:
    llvm/trunk/include/llvm/Support/type_traits.h

Modified: llvm/trunk/include/llvm/Support/type_traits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/type_traits.h?rev=351786&r1=351785&r2=351786&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/type_traits.h (original)
+++ llvm/trunk/include/llvm/Support/type_traits.h Mon Jan 21 23:22:45 2019
@@ -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<T>::value, "inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable");
+#endif
 };
 
 




More information about the llvm-commits mailing list