ambiguous overload for 'push_back' and 'operator+=' #235
Closed
Description
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)