Boost logo

Boost Users :

Subject: Re: [Boost-users] Code stopped compile after migrating 1.42->1.45
From: Igor R (boost.lists_at_[hidden])
Date: 2010-12-07 13:27:05


> typedef std::map<int, int> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net