Reject binary operator* with a clear diagnostic - #367
Merged
Merged
Conversation
jbcoe
marked this pull request as ready for review
September 12, 2026 19:29
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## jbcoe-split-detail-logical-parts #367 +/- ##
=================================================================
Coverage 72.79% 72.79%
=================================================================
Files 12 12
Lines 838 838
Branches 221 221
=================================================================
Hits 610 610
Misses 22 22
Partials 206 206
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jbcoe
added this pull request to stack #362
September 12, 2026 20:29
jbcoe
removed this pull request from stack #362
September 12, 2026 22:29
jbcoe
added this pull request to stack #370
September 12, 2026 22:29
jbcoe
removed this pull request from stack #370
September 12, 2026 22:34
jbcoe
added this pull request to stack #371
September 12, 2026 22:46
philipcraig
reviewed
Sep 13, 2026
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 13:37
695cd34 to
d76436b
Compare
philipcraig
approved these changes
Sep 13, 2026
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
2 times, most recently
from
September 13, 2026 15:27
31d7c3c to
ad67466
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
2 times, most recently
from
September 13, 2026 15:33
bf2c77a to
1cf2118
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:34
1cf2118 to
67189f0
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:37
67189f0 to
7b85ab6
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:37
7b85ab6 to
6e79f39
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:38
6e79f39 to
2cf261a
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:39
2cf261a to
fbc8fc9
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:41
fbc8fc9 to
c16f82e
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:44
c16f82e to
dafe80e
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
2 times, most recently
from
September 13, 2026 15:47
e7c6920 to
4f48c2f
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
2 times, most recently
from
September 13, 2026 15:51
55b920d to
3300c62
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:52
3300c62 to
f54b829
Compare
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
2 times, most recently
from
September 13, 2026 15:53
f266d7c to
a63c073
Compare
operator_thunk only specialised the nullary R(*)() form for op_star, so
an interface with a binary operator* (e.g. `Vec operator*(double) const`)
never matched a partial specialisation and fell through to the deleted
primary template, producing an opaque error deep inside
operator_overload_set instead of a clear diagnostic. Binary operator*
support is deferred; for now, reject it explicitly in
protocol_interface_function_infos, next to the ref-qualified check, so
the error surfaces at the interface.
The arity check excludes an explicit object parameter ("deducing this")
so a unary operator* declared that way isn't misclassified as binary.
Addresses philipcraig's review comment on conformance.hh:146 in #355.
jbcoe
force-pushed
the
jbcoe-reject-binary-operator-star
branch
from
September 13, 2026 15:54
a63c073 to
f3e6cab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes @philipcraig 's review comment on conformance.hh:146 (PR #355): a binary
operator*fell through to the unspecialisedoperator_thunkprimary template instead of failing with a clear diagnostic. Full binaryoperator*support is deferred; this rejects it explicitly at the interface boundary instead.