Skip to content

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

Not planned
@llvmbot

Description

@llvmbot
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.

Activity

ahatanaka

ahatanaka commented on Nov 16, 2022

@ahatanaka
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

ahatanaka commented on Nov 16, 2022

@ahatanaka
Contributor

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

self-assigned this
on Dec 22, 2022
moved this to In Progress in C++ 20 in Clangon Dec 22, 2022
added
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"
on Apr 14, 2024
llvmbot

llvmbot commented on Apr 14, 2024

@llvmbot
MemberAuthor

@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

shafik commented on Apr 14, 2024

@shafik
Collaborator

@fahadnayyar any progress here?

mizvekov

mizvekov commented on Apr 28, 2024

@mizvekov
Contributor

Duplicate of #36505

moved this from In Progress to Done in C++ 20 in Clangon Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzillac++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsduplicateResolved as duplicate

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @mizvekov@royjacobson@shafik@EugeneZelenko@Endilll

      Issue actions

        Clang accepts constraint mismatch at argument in template parameter-list · Issue #49185 · llvm/llvm-project