[libc-commits] [libc] 26ddf2c - [libc] fix missing default template parameter value in enable_if (#65622)

via libc-commits libc-commits at lists.llvm.org
Thu Sep 7 08:42:04 PDT 2023


Author: Guillaume Chatelet
Date: 2023-09-07T17:42:00+02:00
New Revision: 26ddf2c935a04fe53237a99b7d39019a52b0a0a7

URL: https://github.com/llvm/llvm-project/commit/26ddf2c935a04fe53237a99b7d39019a52b0a0a7
DIFF: https://github.com/llvm/llvm-project/commit/26ddf2c935a04fe53237a99b7d39019a52b0a0a7.diff

LOG: [libc] fix missing default template parameter value in enable_if (#65622)

Added: 
    

Modified: 
    libc/src/__support/CPP/type_traits/enable_if.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/CPP/type_traits/enable_if.h b/libc/src/__support/CPP/type_traits/enable_if.h
index 51d7252fc3e48d..a29fc817bb6c9a 100644
--- a/libc/src/__support/CPP/type_traits/enable_if.h
+++ b/libc/src/__support/CPP/type_traits/enable_if.h
@@ -13,7 +13,7 @@
 namespace __llvm_libc::cpp {
 
 // enable_if
-template <bool B, typename T> struct enable_if;
+template <bool B, typename T = void> struct enable_if;
 template <typename T> struct enable_if<true, T> : type_identity<T> {};
 template <bool B, typename T = void>
 using enable_if_t = typename enable_if<B, T>::type;


        


More information about the libc-commits mailing list