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

Move value_t to namespace scope #447

Closed
jaredgrubb opened this issue Feb 9, 2017 · 2 comments
Closed

Move value_t to namespace scope #447

jaredgrubb opened this issue Feb 9, 2017 · 2 comments

Comments

@jaredgrubb
Copy link
Contributor

Would you be willing to move 'value_t' into the nlohmann namespace (and not a member of basic_json)? It is independent of the template parameters and would simplify the template instantiations a bit.

I ask mainly because lldb has trouble decoding it. When I break and inspect the stack vars, it will tell me that m_type is "3" but not that it's "string". Moving it outside the templates allows lldb to pierce this and show the actual name of the value.

Although this is more a bug in lldb/clang than a defect in this library, in this case it's a bit cleaner to have non-template things outside the class.

@gregmarr
Copy link
Contributor

gregmarr commented Feb 9, 2017

value_t is not part of basic_json, it's in nlohmann::detail.

@jaredgrubb
Copy link
Contributor Author

Ah, looks like this has been done recently:

commit d359684
Author: Théo DELRIEU theo@tanker.io
Date: Sat Jan 7 15:26:50 2017 +0100

move enum class value_t outside of basic_json

Awesome. I'll update to latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants