re PR c++/64514 (Error in template instantiation in GCC 4.9, works fine in GCC 4.8)
PR c++/64514 * pt.c (coerce_template_parameter_pack): Return NULL for a zero-length fixed parameter pack with a pack expansion arg. From-SVN: r219558
This commit is contained in:
parent
8f413ae21e
commit
7c368fb23c
@ -1,5 +1,9 @@
|
||||
2015-01-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/64514
|
||||
* pt.c (coerce_template_parameter_pack): Return NULL for a
|
||||
zero-length fixed parameter pack with a pack expansion arg.
|
||||
|
||||
PR c++/64520
|
||||
* pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
|
||||
|
||||
|
@ -6825,6 +6825,9 @@ coerce_template_parameter_pack (tree parms,
|
||||
if (invalid_nontype_parm_type_p (t, complain))
|
||||
return error_mark_node;
|
||||
}
|
||||
/* We don't know how many args we have yet, just
|
||||
use the unconverted ones for now. */
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
packed_args = make_tree_vec (TREE_VEC_LENGTH (packed_parms));
|
||||
|
17
gcc/testsuite/g++.dg/cpp0x/variadic165.C
Normal file
17
gcc/testsuite/g++.dg/cpp0x/variadic165.C
Normal file
@ -0,0 +1,17 @@
|
||||
// PR c++/64514
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template<typename... T>
|
||||
struct Functor
|
||||
{
|
||||
template <T...>
|
||||
struct Inner
|
||||
{};
|
||||
};
|
||||
|
||||
template struct Functor<>::Inner<>;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user