Skip to content

ambiguous overload for 'push_back' and 'operator+=' #235

Description

@alestrooisma

When compiling this very simple program with g++ 4.9.2, I get "ambiguous overload" errors about both the push_back and the operator+= calls.

#include <iostream>
#include "json.hpp"

using json = nlohmann::json;

int main(int argc, char** argv) {
    json data = {{"key", "value"}};
    data.push_back({"key2", "value2"});
    data += {"key3", "value3"};
    return 0;
}

See here for the compiler output (it's rather large)

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions