Skip to content

Compilation error with std::map<std::string, std::string> on vs 2015 #734

@leozzyzheng

Description

@leozzyzheng
using json = nlohmann::json;
json j;
std::map<std::string, std::string> m;
m = j.get<decltype(m)>();

it says error C2665: 'std::pair<const _Kty,_Ty>::pair': none of the 2 overloads could convert all the argument types

if I change to

m = j;

it says 'operator =' is ambiguous

Did I miss anything about converting map data to/from json ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions