Skip to content
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

Make json_pointer usable as map key (again) #3685

Merged

Conversation

falbrechtskirchinger
Copy link
Contributor

@falbrechtskirchinger falbrechtskirchinger commented Aug 7, 2022

Add operator<(json_pointer, json_pointer) and operator<=>(json_pointer) (C++20) to make json_pointer usable as a map key.

Documentation deferred to when the remaining operators are added.

Closes #3680.

To Do:

  • Add at least some unit tests.

@falbrechtskirchinger falbrechtskirchinger force-pushed the json_pointer-map-key branch 3 times, most recently from 0e303f8 to aecfa16 Compare August 7, 2022 09:02
Copy link
Contributor Author

@falbrechtskirchinger falbrechtskirchinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@falbrechtskirchinger falbrechtskirchinger marked this pull request as ready for review August 7, 2022 09:05
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 504acef on falbrechtskirchinger:json_pointer-map-key into b0422f8 on nlohmann:develop.

@nlohmann
Copy link
Owner

nlohmann commented Aug 7, 2022

Documentation deferred to when the remaining operators are added.

What do you mean by that?

@falbrechtskirchinger falbrechtskirchinger changed the title Make json_pointer usable as map key Make json_pointer usable as map key (again) Aug 7, 2022
@falbrechtskirchinger
Copy link
Contributor Author

I want to add the other operators (>, <=, >=) and will do the documentation then.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann added this to the Release 3.11.2 milestone Aug 7, 2022
@nlohmann nlohmann merged commit 31265dc into nlohmann:develop Aug 7, 2022
@falbrechtskirchinger falbrechtskirchinger deleted the json_pointer-map-key branch August 7, 2022 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants