-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[C++20] [Modules] Error with modules, format, pipe operator - function with deduced return type cannot be used #61912
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
Comments
@llvm/issue-subscribers-clang-modules |
Noted that the problem remains after I replace |
Still seeing this error in Clang 18.1.0. |
It looks like the original reproducer doesn't work in upstream: https://godbolt.org/z/5cP4W8YrM Would you like to provide a new reproducer? (And it will be better if it is reduced.) |
It reproduces across a library boundary: https://godbolt.org/z/7zac84afd |
Yeah, it looks like there indeed some problems in the compiler side. To push fixing the underlying issue, may we can try to get a reproducer with containing any system headers. A workaround for users may be: https://godbolt.org/z/5srq6s1cd Another suggestion is, given you're using libc++ in the reproducer, try to use the std module: https://libcxx.llvm.org/Modules.html If you're using libstdc++ actually, I still suggesting to mock a std module by yourself. Due to https://clang.llvm.org/docs/StandardCPlusPlusModules.html#reduce-duplications |
@ChuanqiXu9 I followed your link there for the advice on "reducing duplications". Do you know any tricks to deal with
|
I didn't know it. It looks like some configuration is incorrect in vulkan or I misunderstand your problem. |
Vulkan is configured fine. I mean that I don't see how to re-export a symbol that is defined in the header file as a macro ( |
but modules can't export macros by the design... |
This seems to be a bug.
https://godbolt.org/z/T7Y934rz3
Something bad happening with C++20 modules +
<format>
causes this confusing error. Remove the#include <format>
and it goes away.The text was updated successfully, but these errors were encountered: