Skip to content

Stateful failure to evaluate lambda concept constraint from conditional explicit specifier #67058

@ecatmur

Description

@ecatmur

Clang rejects-valid:

template<class T> concept Q = requires(T t) { [](int*){}(t); }; //static_assert(not Q<int>); struct A { template<class T> explicit(Q<T>) A(T); }; A a = 1;

If the static_assert is uncommented, clang accepts.

If the constraint is inlined, clang accepts-invalid:

struct A { template<class T> explicit(requires(T t) { [](int*){}(t); }) A(T); }; A a = new int;

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsconfirmedVerified by a second party

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions