You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be similar to #734, but I observe different results with different plaftorms, so maybe it is a different thing. On Debian unstable with g++ 7.2.0-7 the following program does not compile:
#include<unordered_map>
#include<string>
#include"json.h"usingnamespacestd;using json = nlohmann::json;
intmain(int argc, charconst *argv[])
{
json j;
unordered_map< int, int > m;
m = j.get<decltype(m)>();
}
However, this does work:
#include<unordered_map>
#include<string>
#include"json.h"usingnamespacestd;using json = nlohmann::json;
intmain(int argc, charconst *argv[])
{
json j;
unordered_map< string, int > m;
m = j.get<decltype(m)>();
}
The only change is string instead of int in the unordered_map template arguments. I tried to go through the template error messages, but my C++ knowledge is not sufficiently advanced. The same happens with clang++ 3.8.1-24, again from Debian unstable.
The text was updated successfully, but these errors were encountered:
This might be similar to #734, but I observe different results with different plaftorms, so maybe it is a different thing. On Debian unstable with g++ 7.2.0-7 the following program does not compile:
However, this does work:
The only change is
string
instead ofint
in theunordered_map
template arguments. I tried to go through the template error messages, but my C++ knowledge is not sufficiently advanced. The same happens with clang++ 3.8.1-24, again from Debian unstable.The text was updated successfully, but these errors were encountered: