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

Clang accepts constraint mismatch at argument in template parameter-list #49185

Closed
llvmbot opened this issue Apr 5, 2021 · 5 comments
Closed
Assignees
Labels
bugzilla Issues migrated from bugzilla c++20 clang:frontend Language frontend issues, e.g. anything involving "Sema" concepts C++20 concepts duplicate Resolved as duplicate

Comments

@llvmbot
Copy link
Member

llvmbot commented Apr 5, 2021

Bugzilla Link 49841
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @zygoloid

Extended Description

https://godbolt.org/z/vf3Gn5hTK

#include <concepts>

template <std::signed_integral>
struct A {};

template <template <std::integral> typename>
struct B {};

B<A> b;

clang accepts it.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@royjacobson royjacobson added the concepts C++20 concepts label Oct 17, 2022
@ahatanaka
Copy link
Contributor

clang rejects the code if I pass -frelaxed-template-template-args to the command line:

error: template template argument 'A' is more constrained than template template parameter ''

@ahatanaka
Copy link
Contributor

https://reviews.llvm.org/D109496 deprecated -frelaxed-template-template-args, but the patch was reverted later.

@fahadnayyar fahadnayyar self-assigned this Dec 22, 2022
@fahadnayyar fahadnayyar moved this to In Progress in C++ 20 in Clang Dec 22, 2022
@Endilll Endilll added the clang:frontend Language frontend issues, e.g. anything involving "Sema" label Apr 14, 2024
@llvmbot
Copy link
Member Author

llvmbot commented Apr 14, 2024

@llvm/issue-subscribers-clang-frontend

Author: None (llvmbot)

| | | | --- | --- | | Bugzilla Link | [49841](https://llvm.org/bz49841) | | Version | trunk | | OS | All | | Reporter | LLVM Bugzilla Contributor | | CC | @zygoloid |

Extended Description

https://godbolt.org/z/vf3Gn5hTK

#include &lt;concepts&gt;

template &lt;std::signed_integral&gt;
struct A {};

template &lt;template &lt;std::integral&gt; typename&gt;
struct B {};

B&lt;A&gt; b;

clang accepts it.

@shafik
Copy link
Collaborator

shafik commented Apr 14, 2024

@fahadnayyar any progress here?

@mizvekov
Copy link
Contributor

Duplicate of #36505

@mizvekov mizvekov marked this as a duplicate of #36505 Apr 28, 2024
@mizvekov mizvekov closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in C++ 20 in Clang Apr 28, 2024
@EugeneZelenko EugeneZelenko added the duplicate Resolved as duplicate label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++20 clang:frontend Language frontend issues, e.g. anything involving "Sema" concepts C++20 concepts duplicate Resolved as duplicate
Projects
Status: Done
Development

No branches or pull requests

8 participants