Boost logo

Boost Users :

Subject: Re: [Boost-users] [bind][function] Do copy constructors invoked inside boost::bind / boost::function get optimized out?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-07-27 05:57:43

Le 27/07/2010 06:34, Steve Lorimer wrote:

> No, I want the object to be reference counted - and am aware that
> internally bind has to make copies. However, I expected at least one,
> perhaps two or three copies to be made. 10 copies made for a single call
> to bind seems really expensive.

According to your earlier test, that's 6, not 10.
Could you try with boost::phoenix::bind and see if it's any different?

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at