[Boost-bugs] [Boost C++ Libraries] #4962: Return type deduction issue in boost::lambda

Subject: [Boost-bugs] [Boost C++ Libraries] #4962: Return type deduction issue in boost::lambda
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-08 07:22:40


#4962: Return type deduction issue in boost::lambda
---------------------------------+------------------------------------------
 Reporter: pavel.pervov@… | Owner: no-maintainer
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: lambda
  Version: Boost 1.45.0 | Severity: Regression
 Keywords: |
---------------------------------+------------------------------------------
 The following code stopped compiling after migration from version 1.42 to
 1.45 of the library:
 {{{
 #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;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4962>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC