diff options
author | Jason Merrill <jason@redhat.com> | 2021-02-25 16:47:53 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-02-25 22:57:48 -0500 |
commit | 7c657339d6a4a671b4cd8bc62ba4e0df6bfc7c72 (patch) | |
tree | 12e25384d7e0d1bab3e76732dfa2f27b0e03eadc /gcc/cp/lambda.c | |
parent | 0159535adb0e7400f2c6922f14a7602f6b90cf69 (diff) | |
download | gcc-7c657339d6a4a671b4cd8bc62ba4e0df6bfc7c72.zip gcc-7c657339d6a4a671b4cd8bc62ba4e0df6bfc7c72.tar.gz gcc-7c657339d6a4a671b4cd8bc62ba4e0df6bfc7c72.tar.bz2 |
c++: Fix class NTTP constness handling [PR98810]
Here, when substituting still-dependent args into an alias template, we see
a non-const type because the default argument is non-const, and is not a
template parm object because it's still dependent.
gcc/cp/ChangeLog:
PR c++/98810
* pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
to a class non-type template argument that needs it.
gcc/testsuite/ChangeLog:
PR c++/98810
* g++.dg/cpp2a/nontype-class-defarg1.C: New test.
Diffstat (limited to 'gcc/cp/lambda.c')
0 files changed, 0 insertions, 0 deletions