Subject: Re: [Boost-users] [Bind] Unexpected behavior when binding const char* to function
From: Igor R (boost.lists_at_[hidden])
Date: 2010-04-26 18:38:51


>   function<void ()> f = boost::bind(echo, s.c_str());

The expression x.c_str() returns a pointer that becomes invalid as
soon as any non-const member function of std::string is called for x.