Commit c592d5d2 by Martin v. Löwis Committed by Martin v. Löwis

decl.c (select_decl): Allow class templates when we need types.

        * decl.c (select_decl): Allow class templates when we need types.
        * decl2.c (ambiguous_decl): Likewise.

From-SVN: r25737
parent 45e24d08
1999-03-12 Martin von Lwis <loewis@informatik.hu-berlin.de>
* decl.c (select_decl): Allow class templates when we need types.
* decl2.c (ambiguous_decl): Likewise.
1999-03-12 Mark Mitchell <mark@markmitchell.com> 1999-03-12 Mark Mitchell <mark@markmitchell.com>
* lex.c (do_identifier): Correct call to enforce_access. * lex.c (do_identifier): Correct call to enforce_access.
......
...@@ -5246,7 +5246,8 @@ select_decl (binding, flags) ...@@ -5246,7 +5246,8 @@ select_decl (binding, flags)
val = TYPE_STUB_DECL (BINDING_TYPE (binding)); val = TYPE_STUB_DECL (BINDING_TYPE (binding));
/* Don't return non-types if we really prefer types. */ /* Don't return non-types if we really prefer types. */
else if (val && LOOKUP_TYPES_ONLY (flags) && TREE_CODE (val) != TYPE_DECL else if (val && LOOKUP_TYPES_ONLY (flags) && TREE_CODE (val) != TYPE_DECL
&& (!looking_for_template || TREE_CODE (val) != TEMPLATE_DECL)) && (TREE_CODE (val) != TEMPLATE_DECL
|| !DECL_CLASS_TEMPLATE_P (val)))
val = NULL_TREE; val = NULL_TREE;
return val; return val;
......
...@@ -4063,8 +4063,7 @@ ambiguous_decl (name, old, new, flags) ...@@ -4063,8 +4063,7 @@ ambiguous_decl (name, old, new, flags)
/* If we expect types or namespaces, and not templates, /* If we expect types or namespaces, and not templates,
or this is not a template class. */ or this is not a template class. */
if (LOOKUP_QUALIFIERS_ONLY (flags) if (LOOKUP_QUALIFIERS_ONLY (flags)
&& (!(flags & LOOKUP_TEMPLATES_EXPECTED) && !DECL_CLASS_TEMPLATE_P (val))
|| !DECL_CLASS_TEMPLATE_P (val)))
val = NULL_TREE; val = NULL_TREE;
break; break;
case TYPE_DECL: case TYPE_DECL:
......
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