Jon Stewart on 22 Aug 2003 19:26:31 -0000 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [ALACPP] boost::bind and global functions? |
> I was coding something with my boss today and wanted to show him the 31337nes > s of boost::bind. The callback signature was: > > typedef void (*ProcessRowFunc)(FetchRow); > > and my boost::bind was: > > boost::bind(&Take::addFile, this, _1) > > where "this" is an instance of "Take" > > The compiler wouldn't match my boost::bind to the global function, which I th > ought it should be able to do. The bind worked fine when I called its > op(), so I'm a bit fuddled. > > "Gavin you stupid git, you need a boost::ref" or some other useful comment wo > uld be appreciated... While the "you need a boost::ref" comment is almost always apropos (especially when fixing Gavin's use of boost::bind... <sigh>), I'm not sure what the problem is. Can you post a bit more code? Like Take::addFile's signature, the l-value of the bind, etc. Jon -- Jon Stewart Advanced Los Angeles C++ stew1@xxxxxxxxxxx http://www.alacpp.org _______________________________________________ alacpp mailing list alacpp@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/alacpp