re PR c++/82468 (ICE with deduction guide template)
/cp 2018-02-16 Paolo Carlini <paolo.carlini@oracle.com> PR c++/82468 * decl.c (check_special_function_return_type): Reject template template parameter in deduction guide. /testsuite 2018-02-16 Paolo Carlini <paolo.carlini@oracle.com> PR c++/82468 * g++.dg/cpp1z/class-deduction48.C: New. From-SVN: r257740
This commit is contained in:
parent
b1a7e33d67
commit
d65da12f2b
4 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2018-02-16 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/82468
|
||||
* decl.c (check_special_function_return_type): Reject template
|
||||
template parameter in deduction guide.
|
||||
|
||||
2018-02-16 Nathan Sidwell <nathan@acm.org>
|
||||
|
||||
PR c++/84375
|
||||
|
|
|
@ -9834,7 +9834,14 @@ check_special_function_return_type (special_function_kind sfk,
|
|||
error_at (smallest_type_quals_location (type_quals, locations),
|
||||
"qualifiers are not allowed on declaration of "
|
||||
"deduction guide");
|
||||
type = make_template_placeholder (CLASSTYPE_TI_TEMPLATE (optype));
|
||||
if (TREE_CODE (optype) == TEMPLATE_TEMPLATE_PARM)
|
||||
{
|
||||
error ("template template parameter %qT in declaration of "
|
||||
"deduction guide", optype);
|
||||
type = error_mark_node;
|
||||
}
|
||||
else
|
||||
type = make_template_placeholder (CLASSTYPE_TI_TEMPLATE (optype));
|
||||
for (int i = 0; i < ds_last; ++i)
|
||||
if (i != ds_explicit && locations[i])
|
||||
error_at (locations[i],
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-02-16 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/82468
|
||||
* g++.dg/cpp1z/class-deduction48.C: New.
|
||||
|
||||
2018-02-16 Nathan Sidwell <nathan@acm.org>
|
||||
|
||||
PR c++/84375
|
||||
|
|
5
gcc/testsuite/g++.dg/cpp1z/class-deduction48.C
Normal file
5
gcc/testsuite/g++.dg/cpp1z/class-deduction48.C
Normal file
|
@ -0,0 +1,5 @@
|
|||
// PR c++/82468
|
||||
// { dg-options -std=c++17 }
|
||||
|
||||
template <template <class> class TT>
|
||||
TT(double) -> TT<int>; // { dg-error "template template" }
|
Loading…
Add table
Reference in a new issue