Boost logo

Boost :

Subject: Re: [boost] [function] Problem with simple pointer to function
From: Fu ji (fujimailing_at_[hidden])
Date: 2017-01-17 04:38:06


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 <hans.dembinski_at_[hidden]>:

>
> > On 17 Jan 2017, at 10:05, Fu ji <fujimailing_at_[hidden]> 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 <boost/function.hpp>
>
> void f(void) {
> std::cout << "Hello World" << std::endl;
> }
>
> int main() {
> boost::function<void(void)> 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
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk