[function] Problem with simple pointer to function

Hello all,
I have a problem with boost::function, when I try to assign function to
pointer I have a crash. It is simple void function();
boost::function

On 17 Jan 2017, at 10:05, Fu ji
wrote: I have a problem with boost::function, when I try to assign function to pointer I have a crash. It is simple void function();
I just tried the following code on http://melpon.org/wandbox, it works fine.
#include <iostream>
#include

Hello Hans,
Mine version is also 1.61, additional information - system is ESXi 6.0,
compiler i686-linux5.0-gcc.
It is really weird because it starts crushing out of the blue. In previous
version it works fine, in ESXi 5.5 it also works as expected. What could
change ? Since it's header only library it shouldnt be a problem that ESXi
is not officially supported.
Best regards,
Damian
2017-01-17 10:22 GMT+01:00 Hans Dembinski
On 17 Jan 2017, at 10:05, Fu ji
wrote: I have a problem with boost::function, when I try to assign function to pointer I have a crash. It is simple void function();
I just tried the following code on http://melpon.org/wandbox, it works fine.
#include <iostream> #include
void f(void) { std::cout << "Hello World" << std::endl; }
int main() { boost::function
bf; bf = &f; bf(); } You are also missing critical information, like the boost version that you are using (in my case it was 1.61).
I think your question might be better placed on to the boost-users mailing list:
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Best regards, Hans
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost
participants (2)
-
Fu ji
-
Hans Dembinski