The following program works for me with VC 7.1. #include <boost/bind.hpp> struct Error {}; struct X { void test( int i ) throw( Error ) {}}; int main() { X obj; boost::bind( &X::test, obj, _1 ); } I try to compile your example, theese are the error messages on my VC 7.1:
C:\sviluppo\r2\boost\build\1.34.1
\include\boost\lambda\detail\bind_functions.hpp(544):
error C2553: no legal conversion of return value to return type 'type' "const boost::lambda::lambda_functor<T>" with
snip [
I hope you can help me
Well I did try it myself, because I noticed that here the lambda bind is mentioned in the error message. However mixing <boost/bind.hpp> with <boost/lambda/bind.hpp> produces another error messages. Above example compiles fine on my pc (using Visual Studio 7.1 and 1.34.0), either using Boost.Bind or Lambda.Bind. Note that both binds are incompatible with each other and under other these circumsatnces they produce 10 pages of cryptic compiler errors.