-
Notifications
You must be signed in to change notification settings - Fork 68
Constrain distance function using is_iterator type trait #96
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
Open
jeremy-murphy
wants to merge
16
commits into
boostorg:develop
Choose a base branch
from
jeremy-murphy:patch-1
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b181c05
Constrain distance function using is_iterator type trait
jeremy-murphy 668fdd0
Add enable_if include
jeremy-murphy d95f074
Fix template syntax in distance function
jeremy-murphy a312350
Fix syntax issue in distance enable_if
jeremy-murphy ec48579
Test which overload of distance is called
jeremy-murphy 71d8fb2
Fix wrong spelling of std::ptrdiff_t
jeremy-murphy c9e4a8d
Move Foo struct to global scope
jeremy-murphy 1ffbb8b
Merge branch 'boostorg:develop' into patch-1
jeremy-murphy 66cdd2e
Andrey magic
jeremy-murphy f5ea042
Fix headers, add copyright
jeremy-murphy 7f737f0
Constrain advance to iterators
jeremy-murphy fa930f2
Test contraint of advance function with int overload
jeremy-murphy 1d642b2
Fix enable_if condition for advance function
jeremy-murphy c20eb82
Fix template syntax in advance constraint
jeremy-murphy 5ea771c
Fix advance test
jeremy-murphy db27fad
Remove constexpr specifier
jeremy-murphy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
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.
This test is not quite as convincing as the one for
distance, because it still passes if I take away the constraint onadvance. Any advice on how to make it fail without the change toadvance?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 guess this question is directed at you, @Lastique.
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.
Regardless of the constraint on
boost::advance, the friendadvanceis the more preferable overload as it is not a template and the arguments don't require conversions. Make it a less preferable overload so thatboost::advanceis picked in overload resolution, e.g. make the second argumentlongor something.