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

json::rvalue dump constness #133

Closed
belugum opened this issue May 18, 2021 · 1 comment · Fixed by #135
Closed

json::rvalue dump constness #133

belugum opened this issue May 18, 2021 · 1 comment · Fixed by #135
Labels
bug Something isn't working

Comments

@belugum
Copy link
Contributor

belugum commented May 18, 2021

Hi!

I'm wondering why the crow::json::rvalue::dump method is not const. I'm trying to use it on a crow::json::rvalue const & and it can't compile. That method shouldn't modify my object so I don't understand.
I changed the constness of the related methods in my crow_all.h file (dump, dump_internal, dump_string, trim, pad), and it compiles and works well.

If there is no particular reason for that I can open a pull request correcting that.

Thanks!

@The-EDev
Copy link
Member

Hello, Thanks a lot for pointing out the issue.. It's most likely me not being used to C++, as a rule of thumb, make your change then build the tests and examples and run the tests, if there's no problem, open a PR.

@The-EDev The-EDev added the bug Something isn't working label May 18, 2021
@The-EDev The-EDev linked a pull request May 18, 2021 that will close this issue
The-EDev added a commit that referenced this issue May 18, 2021
Fix constness on json dump method #133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants