This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71965] [6/7 regression] [concepts] Substitution error *after* failure to satisfy an earlier constraint
- From: "andrew.n.sutton at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Feb 2017 01:45:17 +0000
- Subject: [Bug c++/71965] [6/7 regression] [concepts] Substitution error *after* failure to satisfy an earlier constraint
- Auto-submitted: auto-generated
- References: <bug-71965-4@http.gcc.gnu.org/bugzilla/>
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.