Boost logo

Boost Users :

Subject: Re: [Boost-users] Code stopped compile after migrating 1.42->1.45
From: Pavel Pervov (pavel.pervov_at_[hidden])
Date: 2010-12-07 10:13:48


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

#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>

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;
}

int main()
{
        MyMap a;
        std::cout << a; }
//------- code end ---------------------------------

Pavel

---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.


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