This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71965] [6/7 regression] [concepts] Substitution error *after* failure to satisfy an earlier constraint


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71965

--- Comment #5 from Andrew Sutton <andrew.n.sutton at gmail dot com> ---
Hmm... I haven't looked at this in a while. It looks like the expansion of
ConstructibleObject<int[2][2], int[2][2]> is triggering the diagnostic. I'm a
little surprised that this gets diagnosed -- especially with a "sorry". But it
still shouldn't happen.

The implementation (I suspect this comes out of satisfy_check_constraint)
appears to be substituting through too aggressively. It expands the concept
using the instantiated arguments, the pair of int[2][2]s, around
constraint.cc:2056. I'm guessing that that ultimately triggers a substitution
of those arguments into the requirements of the requires-expression. Bang!
error.

One solution would be to make expand_concept() simply return the definition and
then decompose that expression, substituting when needed.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]