diff options
author | Tom Honermann <tom@honermann.net> | 2019-08-05 19:34:23 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2019-08-05 15:34:23 -0400 |
commit | 8744c37d540324b96e055e467b4967032b269c16 (patch) | |
tree | b923f065cd07d81546aefe0f29f3f8090bae8fa0 /gcc/cp/error.c | |
parent | 719f5a10e750ab216700d13074122ac410bf106f (diff) | |
download | gcc-8744c37d540324b96e055e467b4967032b269c16.zip gcc-8744c37d540324b96e055e467b4967032b269c16.tar.gz gcc-8744c37d540324b96e055e467b4967032b269c16.tar.bz2 |
PR c++/88095, CTAD for literal operator templates per P0732
This patch fixes PR c++/88095: class nontype template parameter UDL string
literals doesn't accepts deduction placeholder
It also addresses a latent issue; literal operator templates with template
parameter packs of literal class type were previously accepted. The patch
corrects this and adds a test (udlit-class-nttp-neg.C).
This fix is needed for one of the char8_t remediation approaches documented
in P1423, and may be helpful for existing code bases impacted by the char8_t
changes adopted via P0482 for C++20.
gcc/cp/ChangeLog:
2019-08-02 Tom Honermann <tom@honermann.net>
* parser.c (cp_parser_template_declaration_after_parameters): Enable
class template argument deduction for non-type template parameters
in literal operator templates.
gcc/testsuite/ChangeLog:
2019-08-02 Tom Honermann <tom@honermann.net>
PR c++/88095
* g++.dg/cpp2a/udlit-class-nttp-ctad.C: New test.
* g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C: New test.
* g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C: New test.
* g++.dg/cpp2a/udlit-class-nttp.C: New test.
* g++.dg/cpp2a/udlit-class-nttp-neg.C: New test.
* g++.dg/cpp2a/udlit-class-nttp-neg2.C: New test.
From-SVN: r274123
Diffstat (limited to 'gcc/cp/error.c')
0 files changed, 0 insertions, 0 deletions