Code stopped compile after migrating 1.42->1.45

I'm compiling my codebase with Microsoft Visual C++ 8/9 (Visual Studio 2005/2008) Here is an example code which I've crafted from what I have in my codebase: //------- 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(&A::value_type::second, boost::lambda::_1) << "\n"); return outs; } int main() { MyMap a; std::cout << a; } //------- code end --------------------------------- This code stopped compiling after I've migrated from boost version 1.42 to version 1.45. Any ideas would be appreciated. Regards, 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.

AMDG On 12/7/2010 6:40 AM, Pavel Pervov wrote:
I'm compiling my codebase with Microsoft Visual C++ 8/9 (Visual Studio 2005/2008)
Here is an example code which I've crafted from what I have in my codebase: //------- 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(&A::value_type::second, boost::lambda::_1)<< "\n"); return outs; }
int main() { MyMap a; std::cout<< a; } //------- code end ---------------------------------
This code stopped compiling after I've migrated from boost version 1.42 to version 1.45.
Any ideas would be appreciated.
It looks like there's a bug in the return type deduction. Can you file a ticket at http://svn.boost.org/? I'll try to deal with it as soon as I can. You can work around the problem using boost::lambda::ret. In Christ, Steven Watanabe
participants (2)
-
Pavel Pervov
-
Steven Watanabe