Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

msimberg
Copy link
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
40 checks passed
@vitaut
Copy link
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