Skip to content

Move value_t to namespace scope #447

Closed

Description

@jaredgrubb

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.

Activity

  1. gregmarr commented on Feb 9, 2017

    @gregmarr
    Contributor

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

  2. jaredgrubb commented on Feb 9, 2017

    @jaredgrubb
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions