[Bug c++/101620] New: gcc incorrectly makes concept checking in incomplete-class context
fchelnokov at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jul 25 20:28:40 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101620
Bug ID: 101620
Summary: gcc incorrectly makes concept checking in
incomplete-class context
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: fchelnokov at gmail dot com
Target Milestone: ---
Compilation of this program
```
struct A {};
template<typename T>
concept DerivedOnceFromA = requires(T t) { { static_cast<const A&>(t) }; };
template<DerivedOnceFromA T>
struct B {};
struct C : A
{
B<C> foo();
};
```
must fail, since B<C> is checked in incomplete struct C context:
https://gcc.godbolt.org/z/ajh8MsY4n
More information about the Gcc-bugs
mailing list