Add a SFINAE friendly iterator_traits and use that instead.#1342
Merged
nlohmann merged 3 commits intonlohmann:developfrom Dec 19, 2018
dgavedissian:bugfix/sfinae-iterator-traits
Merged
Add a SFINAE friendly iterator_traits and use that instead.#1342nlohmann merged 3 commits intonlohmann:developfrom dgavedissian:bugfix/sfinae-iterator-traits
nlohmann merged 3 commits intonlohmann:developfrom
dgavedissian:bugfix/sfinae-iterator-traits
Conversation
nlohmann
requested changes
Nov 9, 2018
theodelrieu
reviewed
Nov 10, 2018
Owner
|
@davedissian Could you please have a look at the requested changes? |
Contributor
Author
|
@nlohmann Sorry, yes. Been meaning to get round to it :) |
nlohmann
approved these changes
Dec 12, 2018
Owner
|
I think this is ready to merge. @theodelrieu Do you agree? |
theodelrieu
reviewed
Dec 13, 2018
| typedef T value_type; | ||
| typedef ptrdiff_t difference_type; | ||
| typedef T* pointer; | ||
| typedef T& reference; |
Contributor
There was a problem hiding this comment.
I would prefer using, but that's a minor thing
Owner
There was a problem hiding this comment.
I agree. @davedissian could you please make this last change. Then it should be good to go. Thanks!
Contributor
|
I added a minor comment, otherwise it looks good to me |
Owner
|
Thanks a lot! |
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 #1341 by implementing our own
iterator_traitsand using that instead to detect whether a type is an iterator.Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmanndirectory, runmake amalgamateto create the single-header filesingle_include/nlohmann/json.hpp. The whole process is described here.Please don't
#ifdefs or other means.