23 Aug
2007
23 Aug
'07
11:48 a.m.
Hello, I encountered the following inconsistency constructing a boost::function object from a pointer to a template function. template <typename T> void foo(T) {} int main(int argc, char **argv) { boost::function<void (int)> f1; f1 = foo<int>; boost::function<void (int)> f2 = foo<int>; f1(0); // ok f2(0); // error, function pointer is zero! return 0; } I am compiling on MSVC2005 SP1, using boost version 1.34.1. It seems to work properly with GCC 4.1.2 and boost 1.33.1 on Ubuntu, however. Is this a known problem? Best Regards, Josef Grahn