[Bug c++/96164] Constraints and explicit template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96164 Patrick Palka changed: What|Removed |Added CC||ryan.burn at gmail dot com --- Comment #8 from Patrick Palka --- *** Bug 68608 has been marked as a duplicate of this bug. ***
[Bug c++/96164] Constraints and explicit template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96164 Andrew Pinski changed: What|Removed |Added CC||akrzemi1 at gmail dot com --- Comment #7 from Andrew Pinski --- *** Bug 77595 has been marked as a duplicate of this bug. ***
[Bug c++/96164] Constraints and explicit template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96164 Patrick Palka changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|--- |10.3 Status|ASSIGNED|RESOLVED --- Comment #6 from Patrick Palka --- This should be fixed for GCC 10.3+, thanks for the report.
[Bug c++/96164] Constraints and explicit template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96164 --- Comment #5 from CVS Commits --- The releases/gcc-10 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:215927a736d21d8cff8baeb50f687911a00149b9 commit r10-8602-g215927a736d21d8cff8baeb50f687911a00149b9 Author: Patrick Palka Date: Wed Jul 29 22:06:33 2020 -0400 c++: constraints and explicit instantiation [PR96164] When considering to instantiate a member of a class template as part of an explicit instantiation of the class template, we need to first check the member's constraints before proceeding with the instantiation of the member. gcc/cp/ChangeLog: PR c++/96164 * constraint.cc (constraints_satisfied_p): Return true if !flags_concepts. * pt.c (do_type_instantiation): Update a paragraph taken from [temp.explicit] to reflect the latest specification. Don't instantiate a member with unsatisfied constraints. gcc/testsuite/ChangeLog: PR c++/96164 * g++.dg/cpp2a/concepts-explicit-inst5.C: New test. (cherry picked from commit dc3d1e181445fafbbd146eb355a750c41c338794)
[Bug c++/96164] Constraints and explicit template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96164 --- Comment #4 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:dc3d1e181445fafbbd146eb355a750c41c338794 commit r11-2417-gdc3d1e181445fafbbd146eb355a750c41c338794 Author: Patrick Palka Date: Wed Jul 29 22:06:33 2020 -0400 c++: constraints and explicit instantiation [PR96164] When considering to instantiate a member of a class template as part of an explicit instantiation of the class template, we need to first check the member's constraints before proceeding with the instantiation of the member. gcc/cp/ChangeLog: PR c++/96164 * constraint.cc (constraints_satisfied_p): Return true if !flags_concepts. * pt.c (do_type_instantiation): Update a paragraph taken from [temp.explicit] to reflect the latest specification. Don't instantiate a member with unsatisfied constraints. gcc/testsuite/ChangeLog: PR c++/96164 * g++.dg/cpp2a/concepts-explicit-inst5.C: New test.
[Bug c++/96164] Constraints and explicit template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96164 Patrick Palka changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #3 from Patrick Palka --- Another testcase: template struct A { void f() requires (N == 3) { static_assert(N == 3); } }; template struct A<2>;
[Bug c++/96164] Constraints and explicit template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96164 Patrick Palka changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2020-07-11 CC||ppalka at gcc dot gnu.org --- Comment #2 from Patrick Palka --- Confirmed. [temp.explicit]/11 says: An explicit instantiation that names a class template specialization is also an explicit instantiation of the same kind (declaration or definition) of each of its members (not including members inherited from base classes and members that are templates) that has not been previously explicitly specialized in the translation unit containing the explicit instantiation, ***provided that the associated constraints, if any, of that member are satisfied by the template arguments of the explicit instantiation*** ...
[Bug c++/96164] Constraints and explicit template instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96164 --- Comment #1 from kaba --- The error is "use of function 'void A::g() requires N == 3 [with int N = 2]' with unsatisfied constraints"