I created a map using
std::map<long,std::vector<long> > indices
When trying to insert a key and vector element with
indices.insert(std::pair<long,std::vector<long> >(0,{0,1,2}));
I get huge lines of error ending with
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/stl_map.h:685:9: note: template argument deduction/substitution failed:
Main.cpp:44:66: note: candidate expects 2 arguments, 1 provided
indices.insert(std::pair<long,std::vector<long> > (0,{0,1,2}));
if during compilation I do
g++ Main.cpp -std=c++17
However it compiles without any error with
g++ Main.cpp -std=c++11
Is the procedure different in c++17 ? If yes, what is it? Or am I missing something?