Skip to content

Reject every interface member that has a reserved name - #528

Open
philipcraig wants to merge 2 commits into
mainfrom
reserved-names-all-members-452
Open

philipcraig wants to merge 2 commits into
mainfrom
reserved-names-all-members-452

Conversation

@philipcraig

Copy link
Copy Markdown
Collaborator

Closes #452.

Option 2 from the issue: an interface with a public member of a reserved name is rejected, whatever kind of member it is. A static member function, data member, type alias, nested type or template named allocator_type, get_allocator, swap, protocol or protocol_view was accepted and ignored.

members_of returns neither the enumerators of an unscoped enumeration nor the members of an anonymous union, so the check visits those too.

Private members are still ignored, as they are everywhere else (#451).

A static member function, data member, alias, nested type or template
with a reserved name was accepted and ignored. The check now covers
every public member, including the enumerators of an unscoped
enumeration and the members of an anonymous union.
@codecov

codecov Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.72%. Comparing base (4557bc1) to head (333b897).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #528      +/-   ##
==========================================
+ Coverage   95.69%   95.72%   +0.02%     
==========================================
  Files          11       11              
  Lines         929      935       +6     
  Branches       31       31              
==========================================
+ Hits          889      895       +6     
  Misses         28       28              
  Partials       12       12              
Flag Coverage Δ
consteval 89.88% <100.00%> (+0.23%) ⬆️
runtime 98.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@philipcraig
philipcraig marked this pull request as ready for review November 28, 2026 19:53
@philipcraig
philipcraig requested a review from jbcoe as a code owner November 28, 2026 19:53
@philipcraig
philipcraig requested a review from RyanJK5 November 28, 2026 19:53
@philipcraig
philipcraig enabled auto-merge (squash) November 28, 2026 19:54
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

Successfully merging this pull request may close these issues.

Reject every interface member that uses a reserved name, static members included

1 participant