8000
Skip to content

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

Merged
vitaut merged 1 commit intofmtlib:masterfrom
msimberg:clang-cuda-std-free
Dec 11, 2023
Merged

Use void(*)(void*) instead of decltype(&std::free) to satisfy clang in CUDA mode#3751
vitaut merged 1 commit intofmtlib:masterfrom
msimberg:clang-cuda-std-free

Conversation

@msimberg
Copy link
Copy Markdown
Contributor

Fixes #3740. It seems like clang is ok with &std::free passed as an argument to the unique_ptr constructor (I think it's able to pick host/device overloads based on the function where it's used, but not inside decltype), so that is intentionally left unchanged.

…n CUDA mode

clang can't resolve &std::free in decltype(&std::free) because std::free
is overloaded (for host and device).
@vitaut vitaut merged commit 89860eb into fmtlib:master Dec 11, 2023
@vitaut
Copy link
Copy Markdown
Contributor
vitaut commented Dec 11, 2023

Thank you!

@msimberg msimberg deleted the clang-cuda-std-free branch December 12, 2023 08:23
happymonkey1 pushed a commit to happymonkey1/fmt that referenced this pull request Apr 7, 2024
…n CUDA mode (fmtlib#3751)

clang can't resolve &std::free in decltype(&std::free) because std::free
is overloaded (for host and device).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compilation error with clang in CUDA mode

2 participants

0