c++: consteval-defarg1.C test variant for templates
authorJakub Jelinek <jakub@redhat.com>
Thu, 3 Dec 2020 14:32:31 +0000 (15:32 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 3 Dec 2020 14:32:31 +0000 (15:32 +0100)
commit341035a54aa8954c66b0492f366b8c65fdb34299
tree3c9137ff9797a56507901a500878ff10008a903e
parent614aff0adf8fba5d843ec894603160151c20f0aa
c++: consteval-defarg1.C test variant for templates

We weren't recognizing a default argument for a consteval member function as
being in immediate function context because there was no function parameter
scope to look at.

The following testcase is an attempt to test it with templates, both
non-dependent and dependent consteval calls in both function and class
templates, and with r11-5694 it now passes.

2020-12-03  Jakub Jelinek  <jakub@redhat.com>

* g++.dg/cpp2a/consteval-defarg2.C: New test.
gcc/testsuite/g++.dg/cpp2a/consteval-defarg2.C [new file with mode: 0644]