-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
string_view support for object access #2685
Closed
Closed
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
e3c2d55
:alembic: at() for std::string_view #1529
nlohmann edd2462
:bug: add missing negation
nlohmann d770517
:bug: add missing negation
nlohmann 7742859
:alembic: add more std::string_view support
nlohmann 6019b5d
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 5ea15c4
:recycle: unify types for object keys
nlohmann ba97e9f
:memo: update documentation
nlohmann 360f21e
:white_check_mark: add tests for count() and contains()
nlohmann 2f2c759
:green_heart: fix build
nlohmann 16fb0cb
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann d01a6a4
:construction: add overload for erase(std::string_view)
nlohmann 4a78689
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann d42f37a
:construction: implement operator[] for string_view
nlohmann 47c7e2c
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 268600e
:ok_hand: apply review comments
nlohmann 203b53d
:bulb: update documentation
nlohmann 5c1c79b
:green_heart: fix build
nlohmann 0ff33d0
:ok_hand: apply review comments
nlohmann f359d74
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 69d74d4
:recycle: clean up
nlohmann 418fdba
:alembic: exclude iterators from KeyType
nlohmann 02b36e9
:alembic: add forgotten forward
nlohmann ea4891f
:ok_hand: implement some review comments
nlohmann 4a16e55
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 0818554
:twisted_rightwards_arrows: merge develop
nlohmann 12c0bc4
:memo: document less-than comparability
nlohmann eb0f8d7
:ok_hand: apply review comments
nlohmann aaef7cd
:ok_hand: apply review comments
nlohmann b27938a
:ok_hand: apply review comments
nlohmann 80cb607
:construction: fix return type
nlohmann 8ba8c43
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 575c28c
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 1bd8a10
:ok_hand: fix code according to review comments
nlohmann 3212700
:ok_hand: fix code according to review comments
nlohmann 86dd665
:alembic: add fix for Clang 3.5
nlohmann 5f39b09
:rewind: undo experimental fix for Clang 3.5
nlohmann d15ad85
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 8b9e297
:twisted_rightwards_arrows: merge develop
nlohmann 11eab8a
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 9b838a0
:twisted_rightwards_arrows: update from develop
nlohmann 76109db
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann e86d8b9
:green_heart: add fix from https://github.com/Minipeps/json/commit/dd…
nlohmann cf06ba8
:green_heart: add fix from https://github.com/Minipeps/json/commit/dd…
nlohmann 25ca594
:memo: overwork documentation
nlohmann 5379b5d
:white_check_mark: improve coverage
nlohmann 15e4598
:ok_hand: address review comments
nlohmann 0eac6b3
:ok_hand: address review comments
nlohmann 47b9b7e
:ok_hand: address review comments
nlohmann 253f39c
:alembic: experiment from https://github.com/nlohmann/json/pull/2685#…
nlohmann 6115454
Merge branch 'develop' of https://github.com/nlohmann/json into strin…
nlohmann 72d8615
:twisted_rightwards_arrows: merge develop branch
nlohmann d8db435
:alembic: try different type alias
nlohmann 2cdf3dd
:rewind: undo commit 15e45981ead5ca64a963d79c5dd5b6d18b2c7a3f
nlohmann b01293f
Merge remote-tracking branch 'origin/string_view' into string_view
nlohmann b18d97d
:rewind: undo commit d8db435c1e1e60ebd93f9e5036437f9b8cc478e4
nlohmann 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 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 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.
a compile-time string literal is, i believe, never a non-const reference to char, they're always const.
and this appears to be a pointer to non-const reference to array of T ?
If it helps you any, you can make an "Alias" typedef, like this:
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'm afraid I do not understand what you mean. In particular, what should go to the
....
part.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.
What would go into the "...." part is whatever the operator[] function should do when given a const-ref to char array.
I just don't see how the function as currently written could possible do anything. It's parameter is a reference to array of pointers, not a reference to array of values.
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.
#171 (comment)
Looks like I might have misdirected you a bit. The functions that were added in this commit were the single argument versions:
and it was to support string literals converted to plain pointers, not the actual literals themselves: