-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[c++20][Modules] incorrect error regarding ambiguous specialization #62943
Comments
@llvm/issue-subscribers-clang-modules |
@llvm/issue-subscribers-clang-frontend |
Given it is a little little bit hard to play around std modules now, I'd like to investigate the issue several weeks later. |
That sounds sensible to me. |
I've create a patch for module support https://reviews.llvm.org/D151814 you could test with that patch or wait until it lands. |
I'd like to wait for it lands. Since I am looking at support modules in clangd recently: clangd/clangd#1293. I feel it may be less overhead to test this after it lands. |
I got the problem. It is much more complex than I thought. I sent a mail to WG21. If you're interested, you can take a look at EWG/CWG's mailing list. |
Thanks for the notification! I'm not subscribed to these lists, but I'll look in the archives. |
…traints Close llvm/llvm-project#62943. The root cause for the issue is that we think the associated constraints from the 'same' declaration in different module units are different incorrectly. Since the constraints doesn't know anything about decls and modules, we should fix the problem by getting the associated constraints from the exactly the same declarations from different modules.
Tested with a recent Clang nightly build, using libc++'s
std
module.llvm-project/libcxx/include/__iterator/readable_traits.h
Line 84 in 11ea40c
Here the
indirectly_readable_traits
causes an ambiguous specialization error in the following code:This code is reduced from the
ranges::data
test. The interesting part is when theindirectly_readable_traits
is used in astatic_assert
for an unrelated type, then the code compiles. When using this code without modules it works too.The text was updated successfully, but these errors were encountered: