prog.cpp: In function 'int main()':
prog.cpp:9:10: error: invalid initialization of reference of type 'const std::map<int, const double&>&' from expression of type 'std::map<int, double&>'
foo(test);
^
prog.cpp:4:6: note: in passing argument 1 of 'void foo(const std::map<int, const double&>&)'
void foo(const std::map<int, const double&>& a) {};
^