PR c++/72801 - ICE with variadic partial specialization
* pt.c (unify_pack_expansion): Use PACK_EXPANSION_EXTRA_ARGS. From-SVN: r249762
This commit is contained in:
parent
98626a3eea
commit
ae2daf1922
|
@ -1,5 +1,8 @@
|
|||
2017-06-28 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/72801 - ICE with variadic partial specialization
|
||||
* pt.c (unify_pack_expansion): Use PACK_EXPANSION_EXTRA_ARGS.
|
||||
|
||||
PR c++/81204 - parse error with dependent template-name
|
||||
* parser.c (cp_parser_lookup_name): Disqualify function templates
|
||||
after lookup.
|
||||
|
|
|
@ -20036,6 +20036,9 @@ unify_pack_expansion (tree tparms, tree targs, tree packed_parms,
|
|||
tree pack, packs = NULL_TREE;
|
||||
int i, start = TREE_VEC_LENGTH (packed_parms) - 1;
|
||||
|
||||
/* Add in any args remembered from an earlier partial instantiation. */
|
||||
targs = add_to_template_args (PACK_EXPANSION_EXTRA_ARGS (parm), targs);
|
||||
|
||||
packed_args = expand_template_argument_pack (packed_args);
|
||||
|
||||
int len = TREE_VEC_LENGTH (packed_args);
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// PR c++/72801
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template < typename, typename > struct A {};
|
||||
|
||||
template < typename ... T > struct B
|
||||
{
|
||||
template < typename > struct C
|
||||
{
|
||||
static const int a = 0;
|
||||
};
|
||||
|
||||
template < typename R, typename ... S >
|
||||
struct C < R (A < T, S > ...) >
|
||||
{
|
||||
static const int a = 1;
|
||||
};
|
||||
};
|
||||
|
||||
#define SA(X) static_assert ((X), #X)
|
||||
SA(B <>::C<int()>::a == 1);
|
||||
|
Loading…
Reference in New Issue