Commit 12eb9f93 by Mark Mitchell Committed by Mark Mitchell

re PR c++/3637 (Internal compiler error in finish_member_declaration)

	PR c++/3637
	* pt.c (lookup_template_class): Ensure that all specializations
	are registered on the list corresponding to the most general
	template.

From-SVN: r47252
parent 3258e996
2001-11-20 Mark Mitchell <mark@codesourcery.com> 2001-11-21 Mark Mitchell <mark@codesourcery.com>
PR c++/3637 PR c++/3637
* pt.c (lookup_template_class): Ensure that all specializations
are registered on the list corresponding to the most general
template.
2001-11-20 Mark Mitchell <mark@codesourcery.com>
* call.c (non_reference): Add documentation. * call.c (non_reference): Add documentation.
(convert_class_to_reference): Do not strip reference types (convert_class_to_reference): Do not strip reference types
from conversion operators. from conversion operators.
......
...@@ -4211,9 +4211,8 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain) ...@@ -4211,9 +4211,8 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain)
Create the partial instantiation. Create the partial instantiation.
*/ */
TREE_VEC_LENGTH (arglist)--; TREE_VEC_LENGTH (arglist)--;
template = tsubst (template, arglist, /*complain=*/0, NULL_TREE); found = tsubst (template, arglist, /*complain=*/0, NULL_TREE);
TREE_VEC_LENGTH (arglist)++; TREE_VEC_LENGTH (arglist)++;
found = template;
} }
} }
......
// Build don't link:
// Origin: philippeb@videotron.ca
// Special g++ Options:
#include <iostream>
using namespace std;
template <class _T> struct traits
{
typedef long next;
};
template <class _T>
struct c1
{
template <class _U>
struct c2
{
c2()
{
cout << __PRETTY_FUNCTION__ << endl;
}
};
};
template <class _T>
void foo()
{
cout << __PRETTY_FUNCTION__ << endl;
c1<typename traits<_T>::next>::c2<void>();
}
int main()
{
foo<int>();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment