Re: [Boost-users] Code stopped compile after migrating 1.42->1.45

Small correction to the code:
//------- code start --------------------------------
#include <algorithm>
#include <map>
#include <string>
#include <iostream>
#include

typedef std::map
MyMap; std::ostream& operator << (std::ostream& outs, const MyMap& a) { std::for_each(a.begin(), a.end(), outs << boost::lambda::bind(&MyMap::value_type::second, boost::lambda::_1) << "\n"); return outs; }
FWIW, if you remove constness from "const MyMap& a" it will compile.
participants (2)
-
Igor R
-
Pavel Pervov