Add operator< to , to allow use as a map key#3680
Add operator< to , to allow use as a map key#3680khiner wants to merge 1 commit intonlohmann:developfrom khiner:develop
operator< to , to allow use as a map key#3680Conversation
|
I'm not too happy with the current state of the Since you're only looking for map support, maybe we should limit this PR to comparing two JSON pointers for less-than and be done. If @nlohmann doesn't object, I'd also skip the documentation for now. It's actually easier for me to copy and adjust the documentation from Also, note that I'm considering one more (small) change to the existing operators. There shouldn't be any merge conflicts or only minor ones. (Waiting on feedback before I proceed.) |
|
I added the bare minimum to get map support into 3.11.2. Hope you don't mind. (#3685) I'll add documentation when I add the remaining operators if Niels allows it. |
|
Thanks @falbrechtskirchinger ! |
This is a replacement for #3667
After looking at how extensive the commit for the other equality operators is, I see how much this PR needs that's not here (tests/docs/etc). I'm more than happy to cargo code/copy-paste and edit based on that commit to make this one look just like that. Lmk if that would be of value and actually helpful and not just a burden to you vs doing it yourself.