Boost logo

Boost :

Subject: Re: [boost] boost.asio and boost.bind question
From: Anthony Foiani (tkil_at_[hidden])
Date: 2012-04-07 00:12:49

Philip Bennefall <philip_at_[hidden]> writes:

> If I have a class method and construct a string within this method,
> and then call post on the IO service with a bind generated function
> object that takes this local std::string as one of its arguments, is
> the string then copied?

I'm pretty sure that this depends on whether the called function
object takes the string by value or by reference.

If it's by value, you're fine. If it's by reference, then I'd worry.

> Thanks in advance for any clarifications.

Hope this helps.

Best regards,

Boost list run by bdawes at, gregod at, cpdaniel at, john at