Use void(*)(void*) instead of decltype(&std::free) to satisfy clang in CUDA mode (#3751)

clang can't resolve &std::free in decltype(&std::free) because std::free
is overloaded (for host and device).
This commit is contained in:
Mikael Simberg 2023-12-11 18:44:02 +01:00 committed by GitHub
parent 274ba2645b
commit 89860eb901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,7 +415,7 @@ struct formatter<
# ifdef FMT_HAS_ABI_CXA_DEMANGLE
int status = 0;
std::size_t size = 0;
std::unique_ptr<char, decltype(&std::free)> demangled_name_ptr(
std::unique_ptr<char, void(*)(void*)> demangled_name_ptr(
abi::__cxa_demangle(ti.name(), nullptr, &size, &status), &std::free);
string_view demangled_name_view;