From 77b4796d4f371ba8a0b32be5930afa87befbe6bd Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Fri, 8 Dec 2023 16:28:07 +0100 Subject: [PATCH] Use void(*)(void*) instead of decltype(&std::free) to satisfy clang in CUDA mode clang can't resolve &std::free in decltype(&std::free) because std::free is overloaded (for host and device). --- include/fmt/std.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/std.h b/include/fmt/std.h index 6f6b23ff4070..dda3c84cf7fe 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -415,7 +415,7 @@ struct formatter< # ifdef FMT_HAS_ABI_CXA_DEMANGLE int status = 0; std::size_t size = 0; - std::unique_ptr demangled_name_ptr( + std::unique_ptr demangled_name_ptr( abi::__cxa_demangle(ti.name(), nullptr, &size, &status), &std::free); string_view demangled_name_view;