Skip to content

assert in findInstantiationOf with concepts & constrained partial specialization #54629

Closed
@royjacobson

Description

Tried to take a look at #53354, managed to hit a weird assertion:

template<typename T>
struct X {};

template <class T>
concept C = requires (T t)
{
  requires sizeof(t) > 4;
};

template <class T>
struct A{};

template <class T>
  requires C<T>
struct A<T> {};

int main() {
  A<X<int>> a;
}

Godbolt: https://godbolt.org/z/W5qc184Yn

I tried to trigger this without the sizeof but didn't manage to.
With asserts disabled it seems to compile correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

c++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptscrashPrefer [crash-on-valid] or [crash-on-invalid]

Type

No type

Projects

  • Status

    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions