Boost logo

Boost :

Subject: Re: [boost] boost::bind result type
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-07-20 13:09:05


Daniel Walker wrote:
> Here's another idea that we might be able to pursue in the future. The
> original complaint is not that there isn't a general way to return a
> bind object; you can use boost::function. The complaint is that
> boost::function isn't optimal, since it precludes inlining. So,
> another approach would be to provide an optimized specialization of
> boost::function for bind objects; i.e. boost::function could leverage
> implementation specific details of boost::bind to store bind objects
> optimally. It makes sense that Boost libraries would be optimized when
> used with other Boost libraries, and presumably, stdlib venders will
> look for similar opportunities for internal optimization in order to
> differentiate themselves. I'm not sure if this is possible, but it
> might be something worth looking into.

This isn't possible without knowing the static type of
the bind object. Boost.Function can't possibly avoid
type erasure, so I don't think this leads anywhere.

In Christ,
Steven Watanabe

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