Boost logo

Boost Users :

Subject: Re: [Boost-users] [bind] code sample crashing MS compiler
From: loadcom (loadcom_at_[hidden])
Date: 2008-12-20 01:46:34


In my understanding of boost::bind, your code has no problem.
It's also accepted by my VS2003SP1 environment.

B/Rgds
Max

----- Original Message -----
From: Christian Henning
To: boost-users_at_[hidden]
Subject: [Boost-users] [bind] code sample crashing MS compiler
Date: 2008-12-20 05:42:00

This following code sample will crash the MS compiler version 8. I
hope there are some MS folks reading this mailing list, since I have
no idea where else to post this.

#include

struct A
{
   void operator() ()
   {
        boost::bind( &A::lookup, *this, unsigned char() )();
   }
    void lookup( unsigned char& c ) {}
};

int main(int argc, char* argv[])
{
    A()();
    return 0;
}

I know the code is not suppose to compile. Uncommenting the this
pointer in the bind construct will make the code compile fine.

Regards,
Christian

-------------------------------------------------------------------
ÐÂÀ˿ռ䡪¡ªÓëÅóÓÑ¿ªÐÄ·ÖÏíÍøÂçÐÂÉú»î£¡(http://space.sina.com.cn/ )


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net