Error in bind1st.cpp example for boost:::function
There is bug in bind1st.cpp example for boost::function library. I'm using VC6SP5 and when I was trying to compile this example I got error === bind1st.cpp D:\src\boost\1.27\libs\function\example\bind1st.cpp(34) : error C2784: 'class std::mem_fun_t<_R,_Ty> __cdecl std::mem_fun(_R (__thiscall _Ty::*)(void))' : could not deduce template argument for '<Unknown>' from 'int (__thiscall X::*)(int)' Error executing cl.exe. === My first thought was that VC6 not enought standard conformant to compile it. But after some inquiry I found that line 35 f = std::bind1st(std::mem_fun(&X::foo), &x); should be f = std::bind1st(std::mem_fun1(&X::foo), &x); May be this is quite obvious, but examples shouldn't have errors. Best regards RNicz
participants (1)
-
rnicz