[libcxx-commits] [libcxx] [llvm] [libc++] Refactor the configuration macros to being always defined (PR #112094)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 6 05:20:51 PST 2024
mstorsjo wrote:
> As you mentioned, checking libc++ internal macros is not something we support. If we supported that, we couldn't make any modifications to the code base without breaking people.
>
> Perhaps you could do something along those lines instead?
>
> ```c++
> if constexpr (std::is_same_v<std::thread::native_handle_type, pthread_t>) {
> // assume pthread
> }
> ```
Hmm, but that expression can't be compiled at all, if the type `pthread_t` isn't declared at this point; in regular builds of libcxx on Windows, there are no pthread headers (which is an optional third party library) included here.
https://github.com/llvm/llvm-project/pull/112094
More information about the libcxx-commits
mailing list