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

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Thu Sep 7 08:37:29 PDT 2023


https://github.com/gchatelet created https://github.com/llvm/llvm-project/pull/65622:

None

>From 6c4f09bc8ec0058c0024fec16a4b007f5516e35b Mon Sep 17 00:00:00 2001
From: Guillaume Chatelet <gchatelet at google.com>
Date: Thu, 7 Sep 2023 15:32:48 +0000
Subject: [PATCH] [libc] fix missing default template parameter value in
 enable_if

---
 libc/src/__support/CPP/type_traits/enable_if.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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