Commit 916b63c3 by Mark Mitchell Committed by Mark Mitchell

re PR c++/25342 (internal compiler error: in lookup_member, at cp/search.c:1209)

	PR c++/25342
	* cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
	documentation.
	* pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
	not TREE_VALUE.
	(instantiate_class_template): Simplify.
	(verify_class_unification): Remove.
	(unify): Document parameters.  Use INNERMOST_TEMPLATE_ARGS to
	permit multiple levels of template arguments.
	(more_specialized_class): Simplify.
	(get_class_bindings): Pass full arguments to unify.  Fold
	verify_class_unification into this function.  Return full
	arguments.
	(most_specialized_class): Adjust for changes to
	get_class_bindings.  Issue errors here for ambiguity.  Return the
	fully deduced arguments for the most specialized class, in
	addition to the partial specialization.
	PR c++/25342
	* g++.gd/template/partial4.C: New test.

From-SVN: r110466
parent f51a281b
2006-01-31 Mark Mitchell <mark@codesourcery.com>
PR c++/25342
* cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
documentation.
* pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
not TREE_VALUE.
(instantiate_class_template): Simplify.
(verify_class_unification): Remove.
(unify): Document parameters. Use INNERMOST_TEMPLATE_ARGS to
permit multiple levels of template arguments.
(more_specialized_class): Simplify.
(get_class_bindings): Pass full arguments to unify. Fold
verify_class_unification into this function. Return full
arguments.
(most_specialized_class): Adjust for changes to
get_class_bindings. Issue errors here for ambiguity. Return the
fully deduced arguments for the most specialized class, in
addition to the partial specialization.
2006-01-31 Ben Elliston <bje@au.ibm.com>
* mangle.c: Comment fix.
......
......@@ -2729,12 +2729,13 @@ extern void decl_shadowed_for_var_insert (tree, tree);
For a class template, this list contains the partial
specializations of this template. (Full specializations are not
recorded on this list.) The TREE_PURPOSE holds the innermost
arguments used in the partial specialization (e.g., for `template
<class T> struct S<T*, int>' this will be `T*'.) The TREE_VALUE
holds the innermost template parameters for the specialization
(e.g., `T' in the example above.) The TREE_TYPE is the _TYPE node
for the partial specialization.
recorded on this list.) The TREE_PURPOSE holds the arguments used
in the partial specialization (e.g., for `template <class T> struct
S<T*, int>' this will be `T*'.) The arguments will also include
any outer template arguments. The TREE_VALUE holds the innermost
template parameters for the specialization (e.g., `T' in the
example above.) The TREE_TYPE is the _TYPE node for the partial
specialization.
This list is not used for static variable templates. */
#define DECL_TEMPLATE_SPECIALIZATIONS(NODE) DECL_SIZE (NODE)
......
2006-01-31 Mark Mitchell <mark@codesourcery.com>
PR c++/25342
* g++.gd/template/partial4.C: New test.
2006-01-31 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/26001
// PR c++/25342
template < typename eval >
struct tpl_seq_search {
typedef typename eval::enum_type Enum;
template < Enum first, Enum last >
struct range {
};
template < Enum val >
struct range<val,val> {
};
};
struct xxx {
typedef int enum_type;
tpl_seq_search<xxx>::range<0, 1> a;
};
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