New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using-declaration is not a member vs [class.member.lookup] #4731
Comments
enum E {e};
struct X {
using E::e;
};
int f(X x) {return x.e;} The declaration set of the lookup for the member-qualified name
|
@opensdh, the suggested approach in the fix sounds reasonable. What do you think? |
Sure. It's a very minor point—we don't say or care what they're members of—but the |
I have to say the declarations in the declaration set are not necessary to be the declarations that were found. As the above example exposed, the found declaration is the using-declaration but the recorded declaration in the declaration set is the replacing declaration for the using-declaration. In normal cases, the declarations in the declaration set are exact the declarations that were found by lookup. However,
Because of the replacement, they are not the same declarations. |
Although the using-declaration declares a synonymous name for the declarations nominated by it, however, the using-declaration does not declare a member, hence the synonymous name is not the name of a member(i.e, a using-declaration that is found is not a declaration of a member).
Is the set of subobjects of
S(a,C)
{C} or{A}? There are some contradictions here.The text was updated successfully, but these errors were encountered: