[llvm] r334888 - [SmallSet] Avoid using is_trivially_XXX<>::value which is C++17

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 16 05:50:33 PDT 2018


Author: fhahn
Date: Sat Jun 16 05:50:32 2018
New Revision: 334888

URL: http://llvm.org/viewvc/llvm-project?rev=334888&view=rev
Log:
 [SmallSet] Avoid using is_trivially_XXX<>::value which is C++17

Modified:
    llvm/trunk/include/llvm/ADT/SmallSet.h

Modified: llvm/trunk/include/llvm/ADT/SmallSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallSet.h?rev=334888&r1=334887&r2=334888&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallSet.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallSet.h Sat Jun 16 05:50:32 2018
@@ -51,11 +51,11 @@ public:
   SmallSetIterator(SetIterTy SetIter) : SetIter(SetIter), isSmall(false) {
     // Use static_assert here, as the SmallSetIterator type is incomplete in the
     // class scope.
-    static_assert(std::is_trivially_destructible<SelfTy>::value &&
-                      std::is_trivially_copy_constructible<SelfTy>::value &&
-                      std::is_trivially_copy_assignable<SelfTy>::value &&
-                      std::is_move_constructible<SelfTy>::value &&
-                      std::is_trivially_move_assignable<SelfTy>::value,
+    static_assert(std::is_trivially_destructible<SelfTy>() &&
+                      std::is_trivially_copy_constructible<SelfTy>() &&
+                      std::is_trivially_copy_assignable<SelfTy>() &&
+                      std::is_move_constructible<SelfTy>() &&
+                      std::is_trivially_move_assignable<SelfTy>(),
                   "SelfTy needs to be trivial copy and move constructors and "
                   "assignments");
   }




More information about the llvm-commits mailing list