Skip to content

Uniform initialization from another json object differs between gcc and clang. #985

Description

@dsiroky

Construction behaves differently with gcc 7.2 and clang 5.

Code to reproduce:

auto j1{nlohmann::json::parse("5")};
auto j2 = nlohmann::json::parse("5");
std::cout << j1.is_array() << '\n';
std::cout << j2.is_array() << '\n';

gcc prints:
1
0

clang prints:
0
0

Both are nlohmann::json instances however j1 has an array wrapped around in gcc.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: proposed fixa fix for the issue has been proposed and waits for confirmation

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions