Copying the decl is unlikely to do what we want, I think. Does putting the
target decl directly into the method vec work?
Unfortunately not, it ends up with the same error: undefined
reference.
Hunh, that's surprising.
Furthermore, I don't think it is the right approach since
the access may be different between the member function and the using
declaration... Never mind.
I would expect the existing access declaration code to deal with that,
though I could be wrong.
There don't seem to be any tests for a class that both uses and defines
functions with the same name to verify that both functions can be
called; I suspect that doesn't work yet with this patch. If we can't
put the used functions directly into CLASSTYPE_METHOD_VEC, we need to
combine them with functions from there at lookup time.
+ if (TREE_CODE (target_field) == FUNCTION_DECL
+ && DECL_NAME (OVL_CURRENT (target_field)) == name)
Checking for FUNCTION_DECL won't work if the target is overloaded.
Jason