-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Atheel/jsoncons release 173 3 #483
Atheel/jsoncons release 173 3 #483
Conversation
@amassalha, We can't release this change as a patch on master, because master contains additional commits since 0.173.2 that we're not prepared to release yet. We could incorporate the change in a patch directly on 0.173.2. |
@danielaparker that would be great. I need to take it from Conan |
How would it be done? |
Please check new branch v0.173.3-patch and verify that it has what you need. |
Yes v0.173.3-patch is exactly what I need (from conan center). |
@danielaparker I tried to release that branch by-myself but seems I don't have permissions |
Note that
You'll always get the right iterator. We're not using constness in the I think you could argue that all of the member functions of |
@danielaparker I see your latests fixes, but you still have the const which is good because without it I will get the below compilation errors. So do we agree on the 'const' or you still have concerns? The issue is when I hold const json object, and I want to call its cbegin(), it needs to be marked as const function. errors (not related to the code example above):
|
take this small full example:
compilation error if having no 'const': clang++ -std=gnu++20 -o jsoncons_example jsoncon.cpp -I/usr/local/miniconda/envs/mfc/include/ -fPIC -Wno-unused-parameter
btw I see different behaviours between clang++ and g++, what are you using? |
Oh, I see, the issue is here
You would only be able to call const member functions on It would work written as
but since we already have 0.173.3-patch started, and I'm fine with making all the member functions of Daniel |
Great, thanks (marking const only the const ones of course, or marking all and adding a non const onse also) |
@danielaparker please see std implementation of iterators: |
In our case, Regarding mutability of a Regarding "allowing modifications" (and not allowing modifications when appropriate), we have thousands of test cases that cover that :-) |
I see, good then |
Incidentally, using jsoncons_list = jsoncons::range<json::const_array_iterator , json::const_array_iterator>; can now be written as using jsoncons_list = json::const_object_range_type; I've added the typedefs |
Great, thanks! |
No description provided.