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.
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
Two-table comparators with strong index types #10730
Two-table comparators with strong index types #10730
Changes from 4 commits
50b8891
b9ed4d7
d67f17e
464ed2b
b26b318
1fd199d
18bd9f0
b5b8b39
4060b4f
73c4b27
9cdbe27
c8a38fe
8b5ef34
77f85b4
529e944
fb0e192
56d99ba
c5998b7
b78d978
3aea8d4
bbaf360
4a1d7aa
09c5661
290323f
4c69edd
fbd5b90
3db6484
3e81b53
1834095
ff26024
f779bff
157abbc
a2ac19d
75249e8
bed1162
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need overloads for
(lhs_index_type, lhs_index_type)
and(rhs_index_type, rhs_index_type)
as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible — but I haven’t found an algorithm that needs those yet. For example, merge requires sorted inputs, so the lhs/lhs and rhs/rhs overloads are never needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, overloads for
(lhs_index_type, lhs_index_type)
and(rhs_index_type, rhs_index_type)
would require this class to own two additional comparators (self comparators for left and right tables).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey guys! I stumbled on to this: using
self_comparator
with strong index types! So we are going to need(lhs_index_type, lhs_index_type)
and(rhs_index_type, rhs_index_type)
overloads forself_comparator
.These overloads just convert
lhs_index_type
orlhs_index_type
intosize_type
and call the normaloperator()(size_type)
.Update: I may not need this as I have another idea to avoid using strong index type, but this is still a relevant need.