re PR c++/33955 (internal compiler error: in dependent_type_p, at cp/pt.c:15245 (vararg template problem))

2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/33955
	* pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.

2007-11-01  Douglas Gregor  <doug.gregor@gmail.com>

	* g++.dg/cpp0x/pr33955.C: New.

From-SVN: r129843
This commit is contained in:
Douglas Gregor 2007-11-02 03:26:46 +00:00 committed by Doug Gregor
parent a19309466a
commit e1a18c68eb
4 changed files with 56 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33955
* pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2007-11-01 Jakub Jelinek <jakub@redhat.com>
PR c++/32384

View File

@ -2504,7 +2504,14 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
*walk_subtrees = 0;
return NULL_TREE;
case TYPENAME_TYPE:
cp_walk_tree (&TYPENAME_TYPE_FULLNAME (t), &find_parameter_packs_r,
ppd, ppd->visited);
*walk_subtrees = 0;
return NULL_TREE;
case TYPE_PACK_EXPANSION:
case EXPR_PACK_EXPANSION:
*walk_subtrees = 0;

View File

@ -1,3 +1,7 @@
2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
* g++.dg/cpp0x/pr33955.C: New.
2007-11-01 Tom Tromey <tromey@redhat.com>
PR preprocessor/30805:

View File

@ -0,0 +1,39 @@
// { dg-options "-std=c++0x" }
template<typename T>
struct uncvref
{
typedef T type;
};
template<typename... Args>
struct args
{
static const int size = sizeof...(Args);
};
template<typename G, typename E, typename S, typename V, long GN = G::size, long EN = E::size>
struct apply_args;
template<typename... G, typename... E, typename S, typename V, long N>
struct apply_args<args<G...>, args<E...>, S, V, N, N>
{
typedef args<
typename G::template apply<typename uncvref<E>::type, S, V>::type...
> type;
};
struct or_
{
template<typename E, typename S, typename V>
struct apply {
typedef typename E::type type;
};
};
template<typename T>
struct identity
{
typedef T type;
};
apply_args<args<or_>, args<identity<int>>, float, double> a1;