c++: optimize specialization of templated member functions
commitf9b5a8e58dfd0642bea932d449ad46da9e57396f
authorPatrick Palka <ppalka@redhat.com>
Fri, 10 Jun 2022 20:09:58 +0000 (10 16:09 -0400)
committerPatrick Palka <ppalka@redhat.com>
Fri, 10 Jun 2022 20:09:58 +0000 (10 16:09 -0400)
tree49669abea358ff708234ce2b3a6389a05c83d6d4
parentcb7fd1ea85feea7ef65328330fc2577a95e99400
c++: optimize specialization of templated member functions

This applies one of the lookup_template_class optimizations from the
previous patch to instantiate_template as well.

gcc/cp/ChangeLog:

* pt.cc (instantiate_template): Don't substitute the context
of the most general template if that of the partially
instantiated template is already non-dependent.
gcc/cp/pt.cc