[libcxx-commits] [libcxx] [llvm] [libc++] Refactor the configuration macros to being always defined (PR #112094)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 6 09:34:35 PST 2024
ldionne wrote:
@mstorsjo I think the problem is that your if condition isn't dependent. I think something like this would fix it:
```c++
template <class Thread>
void maybe_set_thread_name(Thread& t, std::string const& name) {
if constexpr (std::is_same_v<typename Thread::native_handle_type, ::pthread_t>) {
(void)pthread_setname_np(t.native_handle(), name.c_str());
}
}
```
This might be worth trying out.
https://github.com/llvm/llvm-project/pull/112094
More information about the libcxx-commits
mailing list