1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
+ * search.c (envelope_add_decl): Tweak for implicit typename.
+
* call.c (joust): Also warn about confusing conversion op/constructor
overload resolution.
tree name = DECL_NAME (decl);
int dont_add = 0;
+ /* Yet Another Implicit Typename Kludge: Since we don't tsubst
+ the members for partial instantiations, DECL_CONTEXT (decl) is wrong.
+ But pretend it's right for this function. */
+ if (processing_template_decl)
+ type = DECL_REAL_CONTEXT (decl);
+
/* virtual base names are always unique. */
if (VBASE_NAME_P (name))
*values = NULL_TREE;
warning ("in this context");
}
- context = (TREE_CODE (value) == FUNCTION_DECL
- && DECL_VIRTUAL_P (value))
- ? DECL_CLASS_CONTEXT (value)
- : DECL_CONTEXT (value);
+ context = DECL_REAL_CONTEXT (value);
if (context == type)
{