[libcxx-commits] [libcxx] 0761841 - [libcxx] Add a missing include for __enable_if_t (#127016)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 12 23:54:59 PST 2025


Author: Takuto Ikuta
Date: 2025-02-13T08:54:56+01:00
New Revision: 0761841bc000ce3206e043d25eb45e87d6dab0d4

URL: https://github.com/llvm/llvm-project/commit/0761841bc000ce3206e043d25eb45e87d6dab0d4
DIFF: https://github.com/llvm/llvm-project/commit/0761841bc000ce3206e043d25eb45e87d6dab0d4.diff

LOG: [libcxx] Add a missing include for __enable_if_t (#127016)

This is to fix compile error with explicit Clang modules like
```
../../third_party/libc++/src/include/__filesystem/path.h:80:26: error: declaration of '__enable_if_t' must be imported from module 'std_core.type_traits.enable_if' before it is required
   80 | template <class _ECharT, __enable_if_t<__can_convert_char<_ECharT>::value, int> = 0>
      |                          ^
../../third_party/libc++/src/include/__type_traits/enable_if.h:34:1: note: declaration here is not visible
   34 | using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type;
      | ^
```

Added: 
    

Modified: 
    libcxx/include/__filesystem/path.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h
index 0a751ba32954f..698ae209ae1f8 100644
--- a/libcxx/include/__filesystem/path.h
+++ b/libcxx/include/__filesystem/path.h
@@ -18,6 +18,7 @@
 #include <__iterator/back_insert_iterator.h>
 #include <__iterator/iterator_traits.h>
 #include <__type_traits/decay.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_pointer.h>
 #include <__type_traits/remove_const.h>
 #include <__type_traits/remove_pointer.h>


        


More information about the libcxx-commits mailing list