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

C++17 P0522R0 (Matching template template parameters to compatible arguments) only partially implemented #55894

Closed
ackelcn opened this issue Jun 6, 2022 · 9 comments
Labels
c++20 clang:frontend Language frontend issues, e.g. anything involving "Sema" duplicate Resolved as duplicate

Comments

@ackelcn
Copy link

ackelcn commented Jun 6, 2022

I encounter a commit that repaired a clang bug. This commit is from WEB++:
the-moisrex/webpp@97a5947

 - typename istl::filter_parameters<istl::templated_negation<stl::is_void>::type,
 +typename istl::filter_parameters<istl::templated_negation<stl::is_void>::template type,
                                   typename details::resource_extractor_impl<AllocDescTypes>::type>::type

Looks like a clang bug?

@the-moisrex
Copy link

This bug is known and described here.

@EugeneZelenko EugeneZelenko added c++20 clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed new issue labels Jun 6, 2022
@llvmbot
Copy link
Member

llvmbot commented Jun 6, 2022

@llvm/issue-subscribers-clang-frontend

@llvmbot
Copy link
Member

llvmbot commented Jun 6, 2022

@llvm/issue-subscribers-c-20

@fhahn
Copy link
Contributor

fhahn commented Jun 6, 2022

@the-moisrex thanks, I updated the title with the info you provided.

@fhahn fhahn changed the title A clang bug? C++17 P0522R0 (Matching template template parameters to compatible arguments) only partially implemented Jun 6, 2022
@mizvekov
Copy link
Contributor

mizvekov commented Jun 6, 2022

I worked on an implementation of this some time ago.
See: https://reviews.llvm.org/D109496

We tried first just implementing the wording as is, without any resolution to the new issues. There was negative push back, so we reverted. I implemented a workaround, but then @zygoloid suggested a better approach, but I did not have the time to follow that up yet.

@ackelcn
Copy link
Author

ackelcn commented Jun 9, 2022

@mizvekov Many thanks for your effort.
@the-moisrex provided a code sample, and explained how to reproduce the bug. Hope that this problem can be fully resolved.

the-moisrex/webpp#132

@pinskia
Copy link

pinskia commented Apr 24, 2024

Cross reference to GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114841 .

mizvekov added a commit to mizvekov/llvm-project that referenced this issue Apr 26, 2024
…efault

In order to implement this as a DR and avoid breaking reasonable code
that worked before P0522, this patch implements a provisional resolution
for CWG2398: When deducing template template parameters against each other,
and the argument side names a template specialization, instead of just
deducing A, we instead deduce a synthesized template template parameter based
on A, but with it's parameters using the template specialization's arguments
as defaults.

The driver flag is deprecated with a warning.

With this patch, we finally mark C++17 support in clang as complete.

Closes llvm#55894
mizvekov added a commit to mizvekov/llvm-project that referenced this issue Apr 26, 2024
…efault

In order to implement this as a DR and avoid breaking reasonable code
that worked before P0522, this patch implements a provisional resolution
for CWG2398: When deducing template template parameters against each other,
and the argument side names a template specialization, instead of just
deducing A, we instead deduce a synthesized template template parameter based
on A, but with it's parameters using the template specialization's arguments
as defaults.

The driver flag is deprecated with a warning.

With this patch, we finally mark C++17 support in clang as complete.

Closes llvm#55894
@mizvekov
Copy link
Contributor

Closing as duplicate in favor of older issue.

Duplicate of #42224

@mizvekov mizvekov closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
@mizvekov
Copy link
Contributor

Duplicate of #42224

@mizvekov mizvekov marked this as a duplicate of #42224 Apr 27, 2024
@EugeneZelenko EugeneZelenko added the duplicate Resolved as duplicate label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++20 clang:frontend Language frontend issues, e.g. anything involving "Sema" duplicate Resolved as duplicate
Projects
Status: Done
Development

No branches or pull requests

7 participants