I guess I am doing something wrong with the initialisation here, and would like to know what, and why! (I'm not worried about using int[4] here - it's a const map which will be script-generated).
#include <unordered_map>
#include <string>
int main() {
const std::unordered_map<std::string, int[4]> m {
{ "alo", {2,2,1,2} },{ "bok", {1,4,0,7} }
};
}
compiling with:
g++ -std=c++20 foo.cpp
foo.cpp:5:52: error: no matching constructor for initialization of 'const std::unordered_map<std::string, int [4]>' (aka 'const unordered_map<basic_string, int [4]>')