Skip to content
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

[namespace.udecl] p4 The member function of a base class cannot have the signature of the one of a derived class #5440

Open
xmh0511 opened this issue May 4, 2022 · 1 comment

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented May 4, 2022

[namespace.udecl] p4 says

If a constructor or assignment operator brought from a base class into a derived class has the signature of a copy/move constructor or assignment operator for the derived class ([class.copy.ctor], [class.copy.assign]), the using-declaration does not by itself suppress the implicit declaration of the derived class member;

According to [defns.signature.member]

⟨class member function⟩ name, parameter-type-list, class of which the function is a member, cv-qualifiers (if any), ref-qualifier (if any), and trailing requires-clause (if any)

A member of a base class cannot have the signature of the member of a derived class since the classes of which they are members are not the same.

@xmh0511 xmh0511 changed the title [namespace.udecl] p4 The member function of a base class cannot have the signature with the one of a derived class [namespace.udecl] p4 The member function of a base class does not have the signature with the one of a derived class May 4, 2022
@xmh0511 xmh0511 changed the title [namespace.udecl] p4 The member function of a base class does not have the signature with the one of a derived class [namespace.udecl] p4 The member function of a base class cannot have the signature of the one of a derived class May 4, 2022
@jensmaurer
Copy link
Member

signature -> parameter-type-list would fix that, it seems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants