id summary reporter owner description type status milestone component version severity resolution keywords cc 4566 Binding to a class member with lambda::bind() can cause const qualifier mismatch. David Larsson No-Maintainer "The following code (omitting namespaces) would compile correctly in Boost 1.43.0, but now fails with error ''boost/lambda/detail/function_adaptors.hpp(264) : error C2440 : 'return' : cannot convert from 'const int' to 'int &''': {{{ bind( &pair::first, _1 )( make_pair( 1, 0 ) ); }}} The `boost::lambda::bind()` expression creates a function that returns the first element of a pair, and then applies this to a `const pair`. The following will work, because the argument is not constant: {{{ pair x(1,0); bind( &pair::first, _1 )( x ); }}} A workaround for this issue is to specify the return value of `bind()` explicitly, but it shouldn't be necessary for this simple case: {{{ bind( &pair::first, _1 )( make_pair( 1, 0 ) ); }}} I have tested this on VC8 and VC10 with identical results. Thanks for a great library, ''/David''" Bugs closed To Be Determined lambda Boost 1.44.0 Problem fixed