Skip to content

Tweak members_of note that not only special members may be implicitly…#8593

Open
jakubjelinek wants to merge 1 commit into
cplusplus:mainfrom
jakubjelinek:members_of_note
Open

Tweak members_of note that not only special members may be implicitly…#8593
jakubjelinek wants to merge 1 commit into
cplusplus:mainfrom
jakubjelinek:members_of_note

Conversation

@jakubjelinek

Copy link
Copy Markdown
Contributor

…-declared.

@jakubjelinek

Copy link
Copy Markdown
Contributor Author

@jwakely @tomaszkam

In e.g.

struct S { auto operator <=> (const S &) const = default; int s; };

bool operator == (const S &) const = default; is implicitly-declared and std::members_of should first list the explicitly declared members, operator <=> and s and only after that the implicitly-declared ones, 6 special members and operator ==.

@jakubjelinek

Copy link
Copy Markdown
Contributor Author

Implicitly-declared needs to apply both to special members and comparison operator member functions, not sure if it doesn't have to be repeated.

@tomaszkam

Copy link
Copy Markdown

Looks good to me.

@jwakely

jwakely commented Dec 9, 2025

Copy link
Copy Markdown
Member

Please adjust the commit message so the first line starts with the stable tag, e.g.

[meta.reflection.member.queries] tweak members_of note about implicitly-declared members

@eisenwave eisenwave added the P3-Other Triaged issue not in P1 or P2 label Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3-Other Triaged issue not in P1 or P2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants