[llvm] 91d784a - [NFC][SmallVector] Use std::conditional_t instead of std::conditional

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 06:52:44 PDT 2022


Author: wangyihan
Date: 2022-08-15T21:51:13+08:00
New Revision: 91d784a0217f24891de4e55fa06678e45864e57a

URL: https://github.com/llvm/llvm-project/commit/91d784a0217f24891de4e55fa06678e45864e57a
DIFF: https://github.com/llvm/llvm-project/commit/91d784a0217f24891de4e55fa06678e45864e57a.diff

LOG: [NFC][SmallVector] Use std::conditional_t instead of std::conditional

Signed-off-by: wangyihan <yihan.wang at intel.com>

Added: 
    

Modified: 
    llvm/include/llvm/ADT/SmallVector.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
index 67a1901b6db2..167efc2b00a3 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -92,8 +92,8 @@ template <class Size_T> class SmallVectorBase {
 
 template <class T>
 using SmallVectorSizeType =
-    typename std::conditional<sizeof(T) < 4 && sizeof(void *) >= 8, uint64_t,
-                              uint32_t>::type;
+    std::conditional_t<sizeof(T) < 4 && sizeof(void *) >= 8, uint64_t,
+                       uint32_t>;
 
 /// Figure out the offset of the first element.
 template <class T, typename = void> struct SmallVectorAlignmentAndSize {


        


More information about the llvm-commits mailing list