]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: constraints and explicit instantiation [PR96164]
authorPatrick Palka <ppalka@redhat.com>
Thu, 30 Jul 2020 02:06:33 +0000 (22:06 -0400)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:20:12 +0000 (13:20 -0300)
commitab00f710b4b1b258d33eea22f7bfca8e424b4b28
treebb54363d04d1b02ef175e4077e50a69844628d7d
parent2f88e2b7874c7f0d0c35ed77ac5e260113f2ace9
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.
gcc/cp/constraint.cc
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst5.C [new file with mode: 0644]